OpenAI · Anthropic · Gemini · Z.AI

aic-commit

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

See it in action

A real aic-commit run, replayed step by step.

zsh — aic-commit

A git history you can actually read

Stop committing "stuff" and "wip". Let your staged diff describe itself.

The usual 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.

With aic-commit

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.

What it does

🤖

Multiple AI providers

OpenAI, Anthropic, Gemini, and Z.AI. Pick the model that fits your budget and quality bar.

📝

Conventional Commits

Enforces the spec: feat, fix, docs, style, refactor, perf, test, chore, ci, build, revert.

🔀

PR descriptions

Generate a full pull request body and open a real GitHub PR with aic-commit pr --create.

🎚️

Choices & detail

Offer multiple commit suggestions, or use --detailed for multi-line messages with bullets.

🧹

Smart diff filtering

Excludes lockfiles and build noise via glob patterns, so the model sees the changes that matter.

⚙️

Configurable

Config file, environment variables, and CLI flags with clear precedence. Tune it once, forget it.

Providers & default models

Bring your own API key. Each provider has a sensible default model.

ProviderDefault model
OpenAIgpt-4
Anthropicclaude-3-sonnet-20240229
Google Geminigemini-2.5-flash-lite
Z.AIglm-4.6
One thing to know: the top-level 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.

Quick start

Three steps from a staged diff to a clean commit.

1

Set an API key for your provider of choice.

$ export OPENAI_API_KEY=sk-...
2

Stage the changes you want to commit.

$ git add .
3

Run it. Review the suggested message and commit.

$ aic-commit

Pull requests, written for you

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

Get started

Install it, point it at an API key, and let your commits write themselves.