AI-generated conventional commits and PR descriptions, straight from your staged diff.
$ npm install -g aic-commit
bun install -g aic-commit · yarn global add aic-commit
A real aic-commit run, replayed step by step.
Stop committing "stuff" and "wip". Let your staged diff describe itself.
git commit$ git commit -m "stuff"
$ git commit -m "fix"
$ git commit -m "wip"
$ git commit -m "更新"
# Six months later: good luck
# reading this history.
feat(auth): add login form with validation
fix(api): handle null payment response
refactor(parser): simplify token lookup
docs: document the pr subcommand
# A changelog that writes itself.
OpenAI, Anthropic, Gemini, and Z.AI. Pick the model that fits your budget and quality bar.
Enforces the spec: feat, fix, docs, style, refactor, perf, test, chore, ci, build, revert.
Generate a full pull request body and open a real GitHub PR with aic-commit pr --create.
Offer multiple commit suggestions, or use --detailed for multi-line messages with bullets.
Excludes lockfiles and build noise via glob patterns, so the model sees the changes that matter.
Config file, environment variables, and CLI flags with clear precedence. Tune it once, forget it.
Bring your own API key. Each provider has a sensible default model.
| Provider | Default model |
|---|---|
| OpenAI | gpt-4 |
| Anthropic | claude-3-sonnet-20240229 |
| Google Gemini | gemini-2.5-flash-lite |
| Z.AI | glm-4.6 |
aic-commit --provider flag accepts
openai, anthropic, or gemini. To use Z.AI for commits,
set AIC_PROVIDER=zai (env or config). The pr subcommand's
--provider flag does accept zai directly.
Three steps from a staged diff to a clean commit.
Set an API key for your provider of choice.
$ export OPENAI_API_KEY=sk-...
Stage the changes you want to commit.
$ git add .
Run it. Review the suggested message and commit.
$ aic-commit
From staged commits to a finished PR without leaving the terminal.
aic-commit pr reads your branch diff and writes a complete pull request description.
Add --create and it opens a real GitHub PR through the gh CLI, with an AI-generated
title and body, auto-detecting your repository's PR template.
# Generate a PR description from the branch diff $ aic-commit pr # Generate it and open the PR on GitHub via gh $ aic-commit pr --create
Install it, point it at an API key, and let your commits write themselves.