octopurge
v1.0.10
Published
A CLI tool to mass delete GitHub repositories
Maintainers
Readme
Octopurge
A powerful TypeScript-based CLI tool to mass delete GitHub repositories with an interactive interface. Perfect for cleaning up old repositories, managing test repositories, or bulk repository maintenance.
✨ Features
- 🎯 Interactive Selection: Choose repositories using an intuitive checkbox interface
- 🔍 Smart Filtering: Easily find repositories by name or visibility
- 🛡️ Safety First: Built-in confirmation prompts and dry-run mode
- 📊 Progress Tracking: Real-time feedback during deletion process
- ⚡ Type-Safe: Built with TypeScript for reliability
- 🎨 Modern UI: Clean, colorful terminal interface
- 🔄 Bulk Operations: Delete multiple repositories in one go
🚀 Quick Start
From npm
# Install globally
npm install -g octopurge
# Or use npx
npx octopurgeFrom GitHub Packages
# First, create or edit your .npmrc file
echo "@alexkuchar:registry=https://npm.pkg.github.com" >> ~/.npmrc
# Then install globally
npm install -g @alexkuchar/octopurge
# Or use npx
npx @alexkuchar/octopurge🔑 Prerequisites
- Node.js 16 or higher
- A GitHub Fine-grained Personal Access Token with the following permissions:
- Repository access: Select the repositories you want to manage
- Repository permissions:
- Administration: Read and write
📝 Usage
Create a GitHub Fine-grained Personal Access Token:
- Go to GitHub Settings > Developer Settings > Personal Access Tokens > Fine-grained tokens
- Click "Generate new token"
- Set token name (e.g., "Octopurge")
- Set token expiration (recommended: 90 days)
- Select repository access:
- Choose "Only select repositories" and select the ones you want to manage
- Set repository permissions:
- Administration: Read and write
- Click "Generate token"
- Copy the token immediately (you won't be able to see it again)
Login with your token:
octopurge loginRun the tool:
octopurge purgeCommand Options
| Option | Description |
| --------------- | ---------------------------------------------------- |
| -f, --force | Skip confirmation prompt |
| -d, --dry-run | Show what would be deleted without actually deleting |
🛠️ Development
- Clone the repository:
git clone https://github.com/yourusername/octopurge.git
cd octopurge- Install dependencies:
npm install- Build the project:
npm run build- Run in development mode:
npm run dev⚠️ Warning
⚠️ IMPORTANT: This tool permanently deletes repositories. Make sure you have backups of any important code before using this tool. Use the --dry-run option first to preview what would be deleted.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
