@frigopedro/committer
v0.2.0
Published
Generate conventional commit messages using AI
Downloads
388
Maintainers
Readme
AI Git Committer 🤖
I was tired of typing out commit messages, so I wrote this tool. I know bunch of other tools exist, but I had hard times with them.
Its a personal tool, dont expect to be good because its not :/
Install 📦
npm install -g @frigopedro/committerLocal development:
npm linkQuick start ⚡
committerStage everything and commit in one go:
committer .You will get a suggested commit message and can:
yto commitnto abortrto regenerate
The commit message streams live as it is generated.
On first run, committer creates ~/.committer and walks you through provider + model selection.
Re-run onboarding anytime with:
committer --initUsage ✅
committer --provider ollama --model llama3.1
committer --provider openai --model gpt-4o-mini
committer --prompt-append "Prefer mentioning tests if they changed."
committer --staged
committer --allGenerate a PR title and description from commits to a target branch:
committer --pr origin/devIf you run with --provider ollama and no model, it will list local models and let you pick one.
Commit format ✍️
Commit messages are generated as:
<type>[optional scope]: <description>
<body>The body is always present and provides a multi‑sentence summary covering most changed files.
Providers 🔌
Claude
export ANTHROPIC_API_KEY=your_key_hereChatGPT (OpenAI)
export OPENAI_API_KEY=your_key_hereLocal Llama (Ollama)
ollama pull llama3.1committer --provider ollamaConfig file 🧰
~/.committer is a JSON config shared across all repos.
You can override promptAppend per run with --prompt-append.
If useClaudeMd is true, committer will load claude.md from the current
repo root and use its instructions instead of the built-in prompt.
{
"version": 1,
"provider": "ollama",
"model": "llama3.1",
"diffMode": "auto",
"maxDiffChars": 12000,
"promptAppend": "",
"useClaudeMd": false
}Environment variables 🌱
AI_COMMIT_PROVIDER:claude,ollama, oropenaiAI_COMMIT_MODEL: override model nameAI_COMMIT_MAX_DIFF_CHARS: trim diff lengthANTHROPIC_API_KEYorCLAUDE_API_KEY: Claude API keyOPENAI_API_KEY: OpenAI API keyAI_COMMIT_OLLAMA_HOST: Ollama host (defaulthttp://localhost:11434)
Tests 🧪
npm testContributing 🤝
Contributions are welcome! Feel free to open issues or pull requests.
