AI-powered git commands for the lazy. Analyzes your changes and generates atomic, conventional commits automatically.
- Smart commit planning - Groups changes into atomic commits following Angular Conventional Commits
- Multi-backend - Works with Claude CLI or Gemini CLI
- Two-tier cache - Exact-match and incremental caching avoids redundant AI calls
- Code review - AI-powered review of staged or branch changes
- Branch naming - Suggests conventional branch names
- PR generation - Generates PR title and body from branch commits
- Repo Q&A - Freeform questions about your codebase
curl -fsSL https://raw.githubusercontent.com/urmzd/gitit/main/install.sh | shYou can pin a version or change the install directory:
GITIT_VERSION=v0.1.0 GITIT_INSTALL_DIR=/usr/local/bin \
curl -fsSL https://raw.githubusercontent.com/urmzd/gitit/main/install.sh | shcargo install gititgit clone https://github.com/urmzd/gitit.git
cd gitit
cargo install --path .At least one AI backend CLI must be installed:
- Claude CLI (
claude) - Gemini CLI (
gemini)
# Analyze all changes and create atomic commits
gitit commit
# Only analyze staged changes
gitit commit --staged
# Dry run (preview plan without executing)
gitit commit --dry-run
# Skip confirmation prompt
gitit commit --yes
# Add context for the AI
gitit commit --message "focus on the auth refactor"
# Bypass cache (always call AI)
gitit commit --no-cacheThe cache stores commit plans keyed on file content fingerprints. Identical changes produce instant results without an AI call. When only some files change, the incremental tier provides hints to the AI for faster, more consistent plans.
# Show cached entries for this repo
gitit cache status
# Clear cache for this repo
gitit cache clear
# Clear cache for all repos
gitit cache clear --allCache location: ~/.cache/gitit/<repo-id>/entries/ (XDG-compliant). Entries expire after 24 hours with an LRU cap of 20 per repo.
# AI code review
gitit review
# Suggest branch name
gitit branch
# Generate PR description
gitit pr
# Explain recent commits
gitit explain
# Ask questions about the repo
gitit ask "how does authentication work?"All options can be set via CLI flags or environment variables:
| Flag | Env var | Description |
|---|---|---|
--backend |
GITIT_BACKEND |
claude or gemini (auto-detected if unset) |
--model |
GITIT_MODEL |
Model name (e.g. haiku, sonnet) |
--budget |
GITIT_BUDGET |
Max budget in USD, Claude only (default: 0.50) |
--debug |
GITIT_DEBUG |
Enable debug output |
- Fingerprinting - SHA-256 hash of each file's diff (tracked) or content (untracked)
- State key - SHA-256 of sorted fingerprints + staged flag + user message + backend + model
- Tier 1 (exact match) - If the state key matches a cached entry, return the stored plan instantly
- Tier 2 (incremental) - If no exact match but a recent entry shares >50% of files unchanged, inject the previous plan as hints for the AI
Apache-2.0. See LICENSE.