Implement comprehensive safety and UX improvements for Repo-deleter#1
Draft
Implement comprehensive safety and UX improvements for Repo-deleter#1
Conversation
Co-authored-by: Bink-lab <91280973+Bink-lab@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Improve CLI safety, pagination, and UX for repo-deleter
Implement comprehensive safety and UX improvements for Repo-deleter
Sep 2, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR transforms the Repo-deleter from a basic interactive tool into a production-ready CLI application with extensive safety features and improved user experience.
🛡️ Safety Enhancements
Dry-run mode: Added
--dry-runflag to preview what would be deleted without actually executing deletions. This allows users to safely verify their selections before proceeding.Explicit confirmation: The tool now requires users to type "DELETE" (uppercase) to confirm deletion operations, preventing accidental bulk deletions. This can be bypassed with the
--yesflag for automation scenarios.Smart filtering: By default, forked and archived repositories are excluded from the deletion list. Users can opt-in to include them with
--include-forksand--include-archivedflags.🚀 Performance & UX Improvements
Full CLI interface: Replaced the simple interactive program with a robust clap-based CLI that supports:
GITHUB_TOKEN)API pagination: The tool now properly handles GitHub API pagination to list all user repositories, with configurable page size (default 100, max 100).
Enhanced display: Repository listings now show:
Advanced selection: Users can now select repositories using flexible syntax:
Concurrent deletions: Repositories are now deleted concurrently with configurable concurrency (default: 4) for faster bulk operations while respecting API rate limits.
🔧 Technical Improvements
Dependencies: Added
clapfor CLI parsing,futuresfor concurrency, andrustls-tlsfor secure HTTPS connections.Error handling: Improved error messages and graceful handling of:
Code structure: Complete rewrite with proper async/await patterns, structured error handling, and modular design.
📖 Documentation
Updated README with comprehensive documentation including:
Example Usage
This update makes the tool significantly safer for production use while maintaining backward compatibility for basic interactive usage.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/user/repos./target/release/repo-deleter --token invalid_token --dry-run(http block)If you need me to access, download, or install something from one of these locations, you can either:
This pull request was created as a result of the following prompt from Copilot chat.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.