LLM-powered Git commit message generator with multi-provider support
Project description
🚀 Git Auto Commit (gac)
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.
What You Get
Intelligent, contextual messages that explain the why behind your changes:
Quick Start
Use without installing
uvx gac init # Configure your LLM provider
uvx gac # Generate and commit with LLM
That's it! Review the generated message and confirm with y.
Install gac globally
uv tool install gac
gac init
gac
Key Features
🌐 Supported Providers
- Anthropic • Cerebras • Chutes.ai • Fireworks • Gemini
- Groq • LM Studio • MiniMax • Ollama • OpenAI • OpenRouter
- Streamlake • Synthetic.new • Together AI • Z.AI • Z.AI Coding
🧠 Smart LLM Analysis
- 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
📝 Multiple Message Formats
- 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
💻 Developer Experience
- 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
🛡️ Built-in Security
- 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
Usage Examples
Basic Workflow
# Stage your changes
git add .
# Generate and commit with LLM
gac
# Review → y (commit) | n (cancel) | r (reroll)
Common Commands
| Command | Description |
|---|---|
gac |
Generate commit message |
gac -y |
Auto-confirm (no review needed) |
gac -a |
Stage all before generating commit message |
gac -o |
One-line message for trivial changes |
gac -v |
Verbose format with Motivation, Technical Approach, and Impact Analysis |
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 |
Power User Examples
# 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-scan
Interactive Reroll System
Not happy with the result? Use the reroll feature for intelligent regeneration:
# Simple reroll
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 implications
Configuration
Run 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_here
See .gac.env.example for all available options.
Getting Help
- 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gac-1.11.1.tar.gz.
File metadata
- Download URL: gac-1.11.1.tar.gz
- Upload date:
- Size: 42.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8eb5698768779bbc7ec18b8d782655c531deb2935eb53beeb221bcd93cb6066
|
|
| MD5 |
2e4b53a411248bd66c3dd4149e6cd2ee
|
|
| BLAKE2b-256 |
43b169416868411407b6e200d666a8f5ab75be849774ca17dba08911a1a41490
|
File details
Details for the file gac-1.11.1-py3-none-any.whl.
File metadata
- Download URL: gac-1.11.1-py3-none-any.whl
- Upload date:
- Size: 58.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffcfd3ec94d38592aace20b5c58ada6b0f38f2b5cd8521c8893a608c141a834f
|
|
| MD5 |
1ed6d5671f186770b69b1f6db75cf523
|
|
| BLAKE2b-256 |
57be33c24bfba813b94e58616459c2dc4730e4047a41e93737665a69812225ac
|