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.
cargo install git-commaOr build from source:
git clone https://github.com/rfxlamia/git-comma
cd git-comma
cargo build --releaseFirst run walks you through setup automatically. You'll need an OpenRouter API key.
commaReconfigure anytime:
comma --setupgit add <files> → comma → AI reads your diff → ✅ Accept / ✏️ Edit / 🔄 Regenerate
- Preflight — checks for staged files, warns if diff is huge (>15k chars)
- AI generation — sends your diff to OpenRouter with a tuned system prompt
- Action loop — accept, edit in your $EDITOR, or regenerate (optionally with instructions)
- Commit — draft saved to
.git/comma_msg.txtfirst (survives hook failures)
~/.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.

