git-comma 1.0.9

AI-powered git commit message generator using OpenRouter API
Documentation

comma

AI-powered commit messages from your staged diff.

comma reads what you've staged, asks any OpenRouter model to write a commit message, and hands you the result. Accept it, edit it, or regenerate — then commit.

Demo

comma in action Running comma

comma setup First-run setup flow

Install

cargo install git-comma

Or build from source:

git clone https://github.com/rfxlamia/git-comma
cd git-comma
cargo build --release

Quick Start

First run walks you through setup automatically. You'll need an OpenRouter API key.

comma

Reconfigure anytime:

comma --setup

How It Works

git add <files> → comma → AI reads your diff → ✅ Accept / ✏️ Edit / 🔄 Regenerate
  1. Preflight — checks for staged files, warns if diff is huge (>15k chars)
  2. AI generation — sends your diff to OpenRouter with a tuned system prompt
  3. Action loop — accept, edit in your $EDITOR, or regenerate (optionally with instructions)
  4. Commit — draft saved to .git/comma_msg.txt first (survives hook failures)

Config

~/.comma.json with your API key and model ID:

{
  "api_key": "sk-or-v1-...",
  "model_id": "openai/gpt-5.4"
}

Any model on OpenRouter works — pick your own.

MIT license.