Skip to content

Repository files navigation

git-ai

Stop writing commit messages by hand. git-ai generates precise, conventional commit messages from your staged changes — powered by Claude, Codex, or Gemini, right in your terminal.

CIReleaseLicense: MIT

git add -p && git ai commit

Requirements

macOS (Homebrew):

brew install bash gum

Nix:

nix profile install nixpkgs#bash nixpkgs#gum

Install your AI agent separately:

Installation

Nix (recommended)

Run directly without installing:

nix run github:git-extensions/git-ai -- commit

Or install into your profile:

nix profile install github:git-extensions/git-ai

Zsh Plugin

The plugin adds git-ai to your $PATH so git discovers it as a custom command (git ai).

Note: Bash 4.4+ is still required. On macOS: brew install bash.

zinit light git-extensions/git-ai

Manual (symlink)

Symlink the git-ai script onto your $PATH so git discovers it as a custom command:

ln -s /path/to/git-extensions/git-ai/git-ai /usr/local/bin/git-ai

Then use it as git ai <command>.

Usage

git ai commit [-d <DESCRIPTION>] [GIT_COMMIT_OPTIONS]

Commit

Generates a conventional commit message from your staged changes. Use -d/--description to provide extra context or constraints that guide the AI when writing the message.

git add -p
git ai commit
git ai commit -d "focus on the security improvements"
git ai commit --signoff
git ai commit --no-verify

Configuration

Override the AI provider and model via git config.

KeyDefaultDescription
ai.agentclaudeAI agent (claude, codex, gemini)
ai.modelAgent defaultModel for all commands
ai.commit.modelModel override for commit

Agent defaults:

AgentDefault model
claudehaiku
codexgpt-5.4-mini
geminigemini-2.5-flash

Per-command keys take priority over ai.model.

# Set the default model
git config --global ai.model haiku
# Use a stronger model for commits
git config --global ai.commit.model sonnet
# Use Codex
git config --global ai.agent codex
git config --global ai.model gpt-5.4-mini
# Use Gemini
git config --global ai.agent gemini
git config --global ai.model gemini-2.5-flash

The git-extensions Ecosystem

RepoWhat it provides
git-ai ← you are hereAI-powered commit messages for git
git-fzfFuzzy finder for git

License

MIT — Copyright (c) 2025 git-extensions

About

Stop writing commit messages by hand. AI-powered conventional commits from your staged changes — powered by Claude Code.

Topics

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages