commit๐Ÿค–ai

AI-powered Git commit messages from your staged changes โ€” fast, native, and cross-platform.

Built for better Git commits

๐Ÿค–

Bring your AI provider

Gemini plus OpenAI, Cerebras, OpenRouter, Groq, DeepSeek, Ollama, and LM Studio.

๐Ÿ”„

Remote sync

Stash, pull, restore, and stage changes before generating your commit.

๐Ÿ”€

Branch and push

Choose automatic push, a confirmation prompt, or keep every commit local.

๐ŸŽจ

Gitmoji

Generate concise commits with the right Gitmoji prefix.

๐Ÿ“ฆ

Conventional Commits

Use a standard format and edit the message before you commit.

๐Ÿ’ฌ

Native binary

One fast executable for Linux, macOS, and Windows โ€” no shell runtime required.

How it works

terminal
$ commit-ai -c -s
๐Ÿ”„ Syncing with the remote branch...
feat: add document parser route
โœ… Commit created: feat: add document parser route
$ commit-ai -s -c -b new-feature
๐ŸŒฑ Switching to branch "new-feature"...

Install in minutes

bash
$ curl -fsSL https://raw.githubusercontent.com/jhowk14/commit-ai/v2.0.7/any-linux/install.sh | bash
$ commit-ai --setup

Downloads the right native binary for your architecture and keeps your existing configuration.

bash
$ paru -S commit-ai
# Configure your AI provider
$ commit-ai --setup

The AUR package builds the Go binary locally.

powershell
PS> irm https://raw.githubusercontent.com/jhowk14/commit-ai/v2.0.7/windows/install.ps1 | iex
PS> commit-ai --setup

The installer downloads the native .exe and adds it to your user PATH.

โš™๏ธ Configuration

Run commit-ai --setup whenever you want to change your provider, interface language, or push behavior.

~/.commit-ai.conf
format=conventional
auto_confirm=false
language=en
push_mode=ask
use_custom_prompt=false
provider=openai
model=gpt-oss-120b
openai_base_url=https://api.cerebras.ai/v1

CLI options

-s, -S, --sync

Sync before committing: stash, pull, restore, and stage.

-b, --branch

Create or switch a branch and push after the commit.

-c, --conv

Use the Conventional Commits format.

-e, --emoji

Use the Gitmoji format.

-m, --message

Give the AI extra context for a more accurate message.

-p, --preview

Preview the message without creating a commit.

-y, --yes

Create the commit without confirmation.

--setup

Open the interactive configuration flow.

--config

Show configuration without exposing API keys.

-u, --undo

Undo the latest commit while keeping changes staged.

-C, --custom

Use your custom prompt file.

--edit-prompt

Create or edit your custom AI prompt.