gitsweep-cli
v1.0.1
Published
CLI tool to bulk delete GitHub repositories from the terminal.
Maintainers
Readme
🧹 gitsweep-cli
Bulk-delete GitHub repositories from your terminal — safely, quickly, and with full control.
The Problem
GitHub forces you to delete repositories one at a time — navigate to settings, scroll to the danger zone, type the repo name, confirm. Repeat for every single repo.
GitSweep fixes that.
Install
npm install -g gitsweep-cliUsage
gitsweepThat's it. The CLI will guide you through the rest.
GitSweep
──────────────────────────────────────────
Enter your GitHub Personal Access Token: ••••••••••••••••
Fetching your repositories...
Select repositories to delete (space to select, enter to confirm):
○ my-portfolio
● old-project ← selected
● test-repo-2023 ← selected
○ dotfiles
● abandoned-hackathon ← selected
You are about to permanently delete:
• old-project
• test-repo-2023
• abandoned-hackathon
Are you absolutely sure? (y/N): y
Deleting...
✔ Deleted: old-project
✔ Deleted: test-repo-2023
✔ Deleted: abandoned-hackathon
Done. 3 repositories removed.GitHub Token Setup
GitSweep needs a Classic Personal Access Token with the right scopes.
- Go to github.com/settings/tokens
- Click Generate new token → Classic
- Name it
gitsweep - Enable these scopes:
✅ repo ✅ delete_repo - Click Generate token — paste it when the CLI prompts you
Features
- 🔐 Secure token-based authentication
- 📋 Fetches all your repositories (paginated)
- ☑️ Interactive multi-select checklist
- 🗑️ Bulk delete with a single confirmation
- ✅ Safety prompt before any deletion
- 📊 Per-repository success/failure output
Requirements
- Node.js 16 or higher
- A GitHub Personal Access Token with
repoanddelete_reposcopes
⚠️ Warning
Deletion is permanent and irreversible. Always double-check your selections before confirming.
