Generates conventional commit messages from your staged changes using Claude, Gemini, or Codex.
Use the generated message with git commit (e.g. via the git-ai script) and optionally edit it in your editor before committing.
- Go — to build the binary
- Claude, Gemini, or Codex — installed and on your
PATH
macOS/Linux:
make installThis installs the Go binary and scripts/git-ai into $(BINDIR) (default ~/.local/bin). Ensure that directory is on your PATH.
Windows (PowerShell):
./scripts/install-windows.ps1This installs the Go binary plus git-ai.cmd/git-ai.ps1 into $HOME\.local\bin by default. Ensure that directory is on your PATH.
Configure a Git alias on Windows so git ai works:
git config --global alias.ai "!git-ai"Verify:
git config --global --get alias.aiExpected output:
!git-ai
The backend is auto-detected from your PATH (Claude preferred, then Gemini, then Codex). Override with GIT_AI_BACKEND:
| Value | Provider |
|---|---|
claude |
Anthropic Claude CLI |
gemini |
Google Gemini CLI |
codex |
OpenAI Codex CLI |
# Auto-detect (claude preferred, then gemini, then codex)
git ai
# Force a specific backend
GIT_AI_BACKEND=codex git ai
# Print the exact backend command without executing it
git ai --dry-runPowerShell backend override:
$env:GIT_AI_BACKEND='codex'; git ai- Stage your changes:
git add ... - Run:
git ai(orgit-aiif not using a git alias) - The backend drafts a conventional commit message and opens your editor so you can confirm or edit, then commit.