gh-bulk-delete
v1.0.2
Published
Interactively select and delete multiple GitHub repositories at once
Maintainers
Readme
gh-bulk-delete
A CLI tool to interactively select and delete multiple GitHub repositories at once.
Features
- 📋 Lists all your repositories
- ✅ Interactive selection with keyboard commands
- 🔒 Shows private repos and forks
- 🛡️ Requires confirmation before deletion
- 🔑 Supports environment variable or prompt for token
Installation
npm install -g gh-bulk-deleteOr run directly with npx:
npx gh-bulk-deleteSetup
1. Create a GitHub Personal Access Token
- Go to GitHub Settings → Developer settings → Personal access tokens
- Click Generate new token (classic)
- Give it a name (e.g., "bulk-delete")
- Select the
delete_reposcope - Generate and copy the token
2. Set your token (optional)
You can set the token as an environment variable:
# Linux/macOS
export GITHUB_TOKEN=your_token_here
# Windows (PowerShell)
$env:GITHUB_TOKEN="your_token_here"
# Windows (CMD)
set GITHUB_TOKEN=your_token_hereOr the tool will prompt you for it when you run it.
Usage
gh-bulk-deleteCommands
| Command | Action |
|---------|--------|
| 3 | Toggle selection for repo #3 |
| 1,4,7 | Toggle multiple repos |
| 5-15 | Select a range |
| a | Select all |
| n | Deselect all |
| d | Proceed to delete selected |
| q | Quit without deleting |
Example
┌────────────────────────────────────────────────────────────┐
│ SELECT REPOSITORIES TO DELETE │
└────────────────────────────────────────────────────────────┘
1. [ ] my-old-project
2. [ ] 🔒 private-repo
3. [X] test-repo (fork)
4. [X] another-old-repo
📊 Selected: 2 of 4
Command: _Safety
- The tool requires you to type
DELETEto confirm - Only repositories you own can be deleted
- Deletion is permanent and cannot be undone
Requirements
- Node.js 18+ (for native fetch)
- GitHub Personal Access Token with
delete_reposcope
License
MIT
Contributing
Issues and PRs welcome at github.com/Riviergrullon/gh-bulk-delete
