LLM-powered commit messages that understand your code.
Tired of writing commit messages? Replace git commit -m "..." with gac for contextual, well-formatted commit messages generated by large language models.
Instead of generic messages like "update stuff", "fix bug", or "add feature", you get intelligent, contextual messages that explain the why behind your changes:
uvx gac init # Configure your LLM provider
uvx gac # Generate and commit with LLMThat's it! Review the generated message and confirm with y.
uv tool install gac
gac init
gac- Anthropic β’ Cerebras β’ Chutes.ai β’ Gemini β’ Groq
- LM Studio β’ Ollama β’ OpenAI β’ OpenRouter
- Streamlake β’ Synthetic.new β’ Z.AI β’ Z.AI Coding
- Understands intent: Analyzes code structure, logic, and patterns to understand the "why" behind your changes, not just what changed
- Semantic awareness: Recognizes refactoring, bug fixes, features, and breaking changes to generate contextually appropriate messages
- Intelligent filtering: Prioritizes meaningful changes while ignoring generated files, dependencies, and artifacts
- One-liner (-o flag): Single-line commit message following conventional commit format
- Standard (default): Summary with bullet points explaining implementation details
- Verbose (-v flag): Comprehensive explanations including motivation, technical approach, and impact analysis
- Interactive feedback: Regenerate messages with specific requests like
r "make it shorter"orr "focus on the bug fix" - One-command workflows: Complete workflows with flags like
gac -ayp(stage all, auto-confirm, push) - Git integration: Respects pre-commit and lefthook hooks, running them before expensive LLM operations
- Automatic secret detection: Scans for API keys, passwords, and tokens before committing
- Interactive protection: Prompts before committing potentially sensitive data with clear remediation options
- Smart filtering: Ignores example files, template files, and placeholder text to reduce false positives
# Stage your changes
git add .
# Generate and commit with LLM
gac
# Review β y (commit) | n (cancel) | r (reroll)| Command | Description |
|---|---|
gac |
Generate commit message |
gac -y |
Auto-confirm (no review needed) |
gac -a |
Stage all + commit |
gac -o |
One-line message only |
gac -v |
Detailed verbose format |
gac -h "hint" |
Add context for LLM (e.g., gac -h "bug fix") |
gac -s |
Include scope (e.g., feat(auth):) |
gac -p |
Commit and push |
# Complete workflow in one command
gac -ayp -h "release preparation"
# Detailed explanation with scope
gac -v -s
# Quick one-liner for small changes
gac -o
# Debug what the LLM sees
gac --show-prompt
# Skip security scan (use carefully)
gac --skip-secret-scanNot happy with the result? Use the reroll feature for intelligent regeneration:
# Simple regeneration (uses previous context)
r
# With specific feedback
r make it shorter and focus on the performance improvement
r use conventional commit format with scope
r explain the security implicationsRun gac init to configure your provider interactively, or set environment variables:
# Example configuration
GAC_MODEL=anthropic:your-model-name
OPENAI_API_KEY=your_key_here
ANTHROPIC_API_KEY=your_key_hereSee .gac.env.example for all available options.
- Full documentation: USAGE.md - Complete CLI reference
- Troubleshooting: TROUBLESHOOTING.md - Common issues and solutions
- Contributing: CONTRIBUTING.md - Development setup and guidelines
Made with β€οΈ for developers who want better commit messages
β Star us on GitHub β’ π Report issues β’ π Full docs