A TUI (Terminal User Interface) tool for managing GitHub repositories with bulk operations like archiving, deleting, and downloading repositories.
- Browse repositories across organizations and personal accounts
- Filter repositories by name
- Mark repositories for archiving or deletion
- Dry-run mode for safe testing (enabled by default)
- Secure GitHub authentication via Device Flow
- Download repositories as zip archives (coming soon)
git clone <repository-url>
cd gitmop
cargo build --releaseGitMop requires a GitHub OAuth App to authenticate. This is a one-time setup:
-
Create a GitHub OAuth App:
- Go to: https://github.com/settings/applications/new
- Fill in the form:
- Application name:
GitMop(or any name you prefer) - Homepage URL:
https://github.com/yourusername/gitmop(or any URL) - Authorization callback URL:
http://localhost(required but not used)
- Application name:
- Click "Register application"
-
Get your Client ID:
- After creating the app, you'll see a Client ID on the app page
- Copy this Client ID (it looks like:
Ov23liABCDEF1234567)
-
Set the Environment Variable:
export GITHUB_CLIENT_ID=your_client_id_hereTo make this permanent, add it to your shell profile:
echo 'export GITHUB_CLIENT_ID=your_client_id_here' >> ~/.bashrc # or for zsh users: echo 'export GITHUB_CLIENT_ID=your_client_id_here' >> ~/.zshrc
./target/release/gitmopOn first run, GitMop will:
- Open your browser to GitHub
- Show you a device code to enter
- Ask you to authorize the GitMop app
- Save your authentication token securely
# Run in dry-run mode (safe, default)
gitmop
# Run in execute mode (will perform actual operations)
gitmop --execute- Navigation:
hjklor arrow keys - Actions:
spaceto cycle repository actions (None → Archive → Delete) - Filter:
/to search repositories by name - Execute:
A- Confirm archive operationsD- Confirm delete operations (requires typing "Yes, I am sure")E- Toggle between dry-run and live mode
- Other:
rrefresh,qquit
- Dry-run by default: All operations are simulated unless explicitly executed
- Delete confirmation: Requires typing "Yes, I am sure" exactly
- Archive confirmation: Simple yes/no confirmation
- Admin-only repositories: Only lists repos where you have admin permissions
This means you haven't completed the authentication setup. Follow the steps in section 2 above.
Your GITHUB_CLIENT_ID is invalid. Make sure you:
- Created the GitHub OAuth App correctly
- Copied the correct Client ID
- Set the environment variable properly
You can verify your environment variable is set with:
echo $GITHUB_CLIENT_IDIf you're having trouble authenticating:
- Clear stored tokens:
rm ~/.config/gitmop/auth.json - Try again:
gitmop - Make sure you're logged into GitHub in your browser
GitMop stores configuration in ~/.config/gitmop/:
config.json- User preferences and last selected organizationauth.json- Encrypted authentication token (600 permissions)
# Build and run
cargo run
# Run tests
cargo test
# Format and lint
cargo fmt --all && cargo clippy --all-targets -- -D warningsMIT