AI-powered commit message generator that analyzes your changes and creates meaningful commits
- Smart Analysis: Examines staged changes and repository context
- Conventional Commits: Follows your project's commit conventions automatically
- Interactive Mode: Review and approve messages before committing
- Multiple Providers: Supports OpenRouter with various AI models
go install github.com/haadi-coder/Git-Agent/cmd/ga@latest-
Stage your changes:
git add . -
Generate and commit:
export GA_API_KEY="your-openrouter-api-key" ga commit
| Flag | Environment | Default | Description |
|---|---|---|---|
-k, --api-key |
GA_API_KEY |
- | OpenRouter API key |
-m, --model |
GA_MODEL |
openai/gpt-4o |
AI model to use |
-t, --max-tokens |
GA_MAX_TOKENS |
8192 |
Maximum tokens per session |
-i, --instruction |
GA_INSTRUCTIONS |
- | Custom instructions (repeatable) |
-v, --verbose |
GA_VERBOSE |
false |
Show detailed output |
-y, --non-interactive |
GA_NO_INTERACTIVE |
false |
Skip confirmation |
# Basic usage
ga commit
# With custom instructions
ga commit -i "Use imperative mood" -i "Keep under 50 characters"
# Non-interactive mode
ga commit -y
# Different model
ga commit -m "openai/gpt-4"- Analyzes your staged changes using
git statusandgit diff --staged - Understands your project structure and commit history
- Generates a commit message following your project's conventions
- Confirms with you before committing (unless
-yis used)
- Go 1.24.5+
- Git repository
- OpenRouter API key
Built with β€οΈ for developers who care about clean Git history