AI-powered git commit message generator. Analyzes your staged or unstaged changes and writes conventional commit messages for you.
- Multi-provider — OpenAI, Anthropic, Gemini, DeepSeek, Groq, and Ollama
- Batch commits — no staged files? aic splits your unstaged changes into logical atomic commits
- Interactive setup —
aic setupwalks you through provider, API key, and model selection - Conventional Commits — messages follow the Conventional Commits v1.0.0 spec
- Configurable — config file, environment variables, or per-override
macOS / Linux:
curl --proto '=https' --tlsv1.2 -sSfL https://github.com/CaicoLeung/aic/releases/latest/download/aic-installer.sh | shWindows (PowerShell):
irm https://github.com/CaicoLeung/aic/releases/latest/download/aic-installer.ps1 | iexgit clone https://github.com/CaicoLeung/aic.git
cd aic
cargo build --release
# binary at target/release/aic# 1. Configure your LLM provider
aic setup
# 2. Stage some files and commit
git add src/main.rs
aic
# → feat: add CLI argument parsing
# Created commit abc1234
# Or run with no staging — aic batches unstaged changes automatically
aic| Command | Description |
|---|---|
aic |
Generate commit messages for staged files. If nothing is staged, batch-plan all unstaged changes into logical commits. |
aic setup |
Interactive wizard to pick provider, enter API key, and select model. |
aic list |
Show resolved config: provider, model, and where each value comes from (env / config / default). |
Config file: ~/.config/aic/config.toml
| Variable | Purpose | Default |
|---|---|---|
LLM_BACKEND |
Provider name | openai |
LLM_API_KEY |
API key (falls back to provider-specific vars) | — |
LLM_MODEL |
Model ID override | Provider default |
AIC_SYSTEM_PROMPT |
Override the commit message system prompt | Built-in prompt |
Provider-specific API key env vars (OPENAI_API_KEY, ANTHROPIC_API_KEY, etc.) are also recognized.
For each of backend, api_key, model:
- Generic env var (
LLM_BACKEND,LLM_API_KEY,LLM_MODEL) - Provider-specific env var (API key only)
- Config file (
~/.config/aic/config.toml) - Built-in default
| Provider | Default model | Env key |
|---|---|---|
| OpenAI | gpt-4o-mini |
OPENAI_API_KEY |
| Anthropic | claude-sonnet-4-20250514 |
ANTHROPIC_API_KEY |
| Gemini | gemini-2.0-flash |
GEMINI_API_KEY |
| DeepSeek | deepseek-chat |
DEEPSEEK_API_KEY |
| Groq | llama-3.3-70b-versatile |
GROQ_API_KEY |
| Ollama | llama3.2 |
(localhost:11434, no key needed) |
aic
├─ staged files? → diff staged files → LLM generates message → commit
└─ no staged? → diff workdir → LLM splits into batches → for each batch:
git add → LLM generates message → commit
All commit messages follow Conventional Commits (feat:, fix:, refactor:, etc.) with an optional body.
- Run
cargo fmtbefore committing - Run
cargo clippy -- -D warningsand fix all warnings - Add tests for new behaviour in
src/or as integration tests intests/