A lightweight and expressive CLI toolkit for Git cleanup, repo hygiene, and everyday automation. Designed to save your time — and your branches.
Clone the repo and run the setup script:
git clone git@github.com:lcnunes09/cli-toolkit.git && cd cli-toolkit && ./scripts/setup.shThis will:
- ✅ Make all CLI tools in
bin/executable - ✅ Add the CLI directory to your shell path (
.zshrcor.bashrc) - ✅ Warn you if Git or SSH are missing or misconfigured
- ✅ Add an alias
ghclito jump to the repo folder - ✅ Install the
fixzshcommand globally - ✅ Remind you to source your shell to finish setup
💡
fixzshis now globally available after runningsetup.sh— no need to configure anything else.
Deletes all merged local and remote branches in one go — except protected ones like main, dev, and master.
ghclean --help
ghclean --dry-run # Preview deletions
ghclean --remote-only # Only delete remote branches
ghclean --confirm # Prompt before each deletion
ghclean --dry-run --confirm # Preview and prompt- ✅ Safe: must run from a base branch (main, dev, master)
- ✅ Smart: skips protected branches and shows a cleanup summary
- ✅ Powerful: cleans all merged branches in one pass
Deletes local branches that were removed remotely (e.g. after a PR is merged):
ghprune # See which local branches were actually removedCreates a .bundle archive of your repo — all branches included:
ghsafePerfect for backups or safe transfer.
Displays Git info like:
- Current branch
- Uncommitted changes
- Unpushed commits
- Remote tracking
- Unmerged branches (into base)
ghstatus # Quick status
ghstatus --verbose # Full details
ghstatus --base main # Check what's not merged into 'main'
ghstatus -v --base dev # Verbose for unmerged into devDisplays your configured Git name, email, SSH connection status, and whether an SSH key is present.
ghwhoamiIf your terminal ever shows:
zsh: corrupt history file /home/yourname/.zsh_historyJust run:
fixzshThis command will:
- 🔐 Backup your current (possibly corrupted) history file
- 🛉 Strip out invalid or unreadable content
- 🔁 Replace it with a clean version
- ✅ Eliminate the startup error for good
fixzshis installed globally bysetup.sh— use it from anywhere, anytime.
ghtrack– Fix or report branches not tracking originghdiff– Show diff vs main with flagsghreset– Hard reset local branch to remoteghfix– Common Git misconfig fixes
Do you want to collaborate? Open an issue or PR!
MIT