GitDude is an AI-powered Git workflow assistant that turns plain English into git actions β commit, review, recover, and understand your repo from the terminal.
- π€ Multi-provider AI β Gemini (default, free), Groq (fastest), Ollama (100% local), OpenAI
- π¬ Natural language commands β
gitdude do "stash, switch to main, pull" - π AI code review β bugs, security issues, quality flags before you push
- πΏ Smart branch naming β
gitdude branch "fix login problem" - πΎ Commit only β
gitdude commitgenerates messages without pushing - π¬ Codebase chat β
gitdude chat "how does X work?" - π Emergency recovery β
gitdude whoopsdiagnoses and fixes git disasters - π PR generation β full GitHub PR description, auto-copied to clipboard
- π·οΈ Automated Tagging β
gitdude tagsuggests versions and generates release notes - π¨ Beautiful Rich UI β tables, panels, spinners, color-coded output
- π Secure config β keys stored in
~/.gitdude/config.json, never in.env
# 1. Install
pip install gitdude
# 2. Configure (takes 60 seconds)
gitdude config
# 3. Generate an AI commit message and push
gitdude push
# 4. Ask about your code
gitdude chat "what does this project do?"
# 5. Review your code before merging
gitdude review
# 6. Something went wrong? Ask for help
gitdude whoopspip install gitdudePython 3.10+ required.
- Get an API key from Google AI Studio
- Run
gitdude configβ choosegeminiβ paste key
- Get a key at console.groq.com/keys
- Run
gitdude configβ choosegroqβ paste key
- Install Ollama: ollama.ai
- Pull a model:
ollama pull llama3 - Run
gitdude configβ chooseollama(no key needed)
- Get a key at platform.openai.com
- Run
gitdude configβ chooseopenaiβ paste key
AI-generates a commit message for your changes, lets you confirm/edit, then commits and pushes.
gitdude push # Stage all β AI commit β push
gitdude push --no-confirm # Skip confirmation
gitdude push --dry-run # Preview only, don't execute
gitdude push --style freeform # Use freeform (not conventional) commit styleCommit types (conventional): feat, fix, chore, docs, refactor, style, test, perf, ci
AI-generates a commit message for your changes, lets you confirm/edit, and commits (but does NOT push).
gitdude commit # Stage all β AI commit
gitdude commit --no-confirm # Skip confirmation
gitdude commit --dry-run # Preview only, don't execute
gitdude commit --style freeform # Use freeform commit styleFetch + rebase. If there are merge conflicts, AI explains what's conflicting and gives exact resolution steps.
gitdude sync
gitdude sync --dry-runShows last 30 commits in a table. Pick one to go back to, choose a mode.
gitdude back
gitdude back --dry-runModes: soft (keep changes staged), hard (discard changes), checkout (detached HEAD), branch (new branch from that commit)
Convert plain English into a sequence of git commands, preview, then execute.
gitdude do "stash my changes, switch to main, pull latest"
gitdude do "create a new branch called feature/auth and push it"
gitdude do "squash my last 3 commits" --dry-runIf any command fails, AI reads the error and suggests a fix.
Diffs your current branch vs main/master, then AI reviews for bugs, security issues, and quality.
gitdude review
gitdude review --base develop # Compare against a different branch
gitdude review --dry-run # Show diff without AI reviewReview sections: Summary Β·
AI-generates a clean, conventional branch name from your description.
gitdude branch "fix the login timeout bug"
# β Suggests: fix/login-timeout-bug
# β Prompts: create branch / edit name / cancelAsk questions about your codebase. It reads your file tree, README, and recent history to provide specific answers.
gitdude chat "how do I add a new command to this app?"
gitdude chat "where is the AI provider logic located?"Generates a complete PR title + description + bullet list + testing notes. Auto-copies to clipboard.
gitdude pr
gitdude pr --base develop # Compare against develop
gitdude pr --no-copy # Don't copy to clipboardScans commits since last tag, suggests next version, and generates release notes.
gitdude tag
gitdude tag --no-confirm # Skip confirmation
gitdude tag --dry-run # Preview onlyEmergency recovery. Feeds git status + log + reflog to AI. Diagnoses what went wrong and gives step-by-step recovery.
gitdude whoops
gitdude whoops --dry-run # Diagnose only, don't executeInteractive configuration wizard.
gitdude config # Run setup
gitdude config --show # Print current config (keys masked)
gitdude config --reset # Wipe config and redo setupStored settings:
- AI provider (
gemini/groq/ollama/openai) - API key per provider
- Model name per provider
- Default branch (
mainormaster) - Commit style (
conventionalorfreeform)
gitdude/
βββ main.py # Typer app β all command definitions
βββ ai.py # Unified AI provider wrapper (ask_ai)
βββ git_ops.py # GitPython operations (diff, log, push, resetβ¦)
βββ config.py # Config at ~/.gitdude/config.json
βββ utils.py # Rich panels, tables, prompts, helpers
AI Providers (ai.py):
| Provider | SDK | Default Model | Speed | Cost |
|---|---|---|---|---|
gemini |
google-generativeai |
gemini-2.0-flash |
Fast | Free tier |
groq |
groq |
llama-3.3-70b-versatile |
Fastest | Free tier |
ollama |
ollama |
llama3 |
Local | Free (local) |
openai |
openai |
gpt-4o-mini |
Fast | Pay per use |
All providers go through a single interface: ask_ai(prompt) -> str with spinner feedback and unified error handling.
- β All destructive operations (hard reset, force push, etc.) require explicit confirmation
- β
--dry-runflag available on all mutating commands - β Color-coded risk levels β green (safe), yellow (caution), red (destructive)
- β No tracebacks β all exceptions caught and shown as friendly Rich error panels
- β
API keys stored privately in
~/.gitdude/config.json, never in project files
- Fork the repo
- Create a feature branch:
git checkout -b feat/amazing-feature - Make your changes
- Run linting:
ruff check . - Open a PR β or just use
gitdude prto generate your PR description! π
Dev setup:
git clone https://github.com/utkarshgupta188/gitdude
cd gitdude
pip install -e ".[dev]"MIT Β© GitDude Contributors