• Stars
    star
    295
  • Rank 140,902 (Top 3 %)
  • Language
    JavaScript
  • Created over 3 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

๐Ÿ”ซ Pew pew needless GitHub repos from your CLI!

Logo
github-pewpew

Pew pew needless GitHub repos!
Clean up your unused repos via the CLI within seconds.

npm version


Preview of the tool

Installation and Usage

To install the latest version of github-pewpew CLI, run this command:

npm i -g github-pewpew

To quickly start using it, run the following command:

ghpew

Available commands:

ghpew repos
ghpew codespaces
ghpew help

Why?

Have you ever had too much fun with the GitHub API and ended up creating too many dummy repos? Me too ๐Ÿ˜…!

I made this little CLI tool to clean up repositories quickly. I'm planning to add some flags and regexp to delete in bulk in the future. Let me know if that sounds interesting to you.

Do you want to know more? Visit the official website.

Development

The important parts of the project are the following:

โ”œโ”€โ”€ .github                GitHub Actions workflows and repo settings
โ”œโ”€โ”€ src
โ”‚   โ”œโ”€โ”€ commands
โ”‚ย ย  โ”‚ย ย  โ”œโ”€โ”€ codespaces.js  Contains the command to delete codespaces
โ”‚ย ย  โ”‚ย ย  โ””โ”€โ”€ repos.js       Contains the command to delete repos
โ”‚ย ย  โ”œโ”€โ”€ config.js          Contains the configuration manager
โ”‚ย ย  โ”œโ”€โ”€ github.js          Business logic: authentication and API calls
โ”‚ย ย  โ”œโ”€โ”€ ui.js              CLI interactions
โ”‚ย ย  โ””โ”€โ”€ utils.js           Lightweight utility functions
โ”œโ”€โ”€ test
โ”‚ย ย  โ””โ”€โ”€ test.js            Test coverage with Mocha
โ”œโ”€โ”€ .prettierrc            Code formatting configuration
โ”œโ”€โ”€ index.js               The main thread of execution
โ”œโ”€โ”€ README.md              you're looking at it

To set up your environment to develop this tool, run:

  • npm install
  • node index

You can also run node index DEV=true CLIENT_ID=<YOUR_TESTING_CLIENT_ID> if you want to use your own client id for development and testing purposes.

All the tests are written with mocha and can be run with npm test.

TODO

  • TODO: --force flag to avoid confirmation
  • TODO: --regex flag to delete repos matching a regex
  • TODO: --list flag to delete repos from a comma-separated list
  • TODO: --archive and -a flag to archive repositories instead of deleting
  • TODO: ghpew gists command to delete gists

Questions? Ideas? Bugs?

If you run into any issues or you'd like to share your thoughts, feel free to open an issue in this repository or hit me up on Twitter.

Contributions

Logo designed by Rapha Lopes. Thanks to @sergiou87, @zschiller, @mamuso, @anishde12020, and @jdvr for contributing with their feedback and ideas ๐Ÿ™‡โ€โ™‚๏ธ.

License

The tool is available as open-source under the terms of the MIT License.