Generate git commit messages from your diff with an LLM, review them, and commit, all from one command.
View on GitHubInstall straight from GitHub, no clone needed. Requires Python 3.10 or newer.
uv tool install git+https://github.com/quadram-institute-bioscience/commitize
pipx install git+https://github.com/quadram-institute-bioscience/commitize
To try it once without installing: uvx --from git+https://github.com/quadram-institute-bioscience/commitize commitize. To upgrade later: uv tool upgrade commitize.
OpenRouter works out of the box. Any other OpenAI-compatible API (OpenAI, Groq, a local Ollama server) can be configured too.
Get a key from OpenRouter and export it in your shell.
export OPENROUTER_API_KEY=sk-or-...
Nothing staged? commitize falls back to your unstaged changes and offers to stage them for you.
git add -p
commitize
You'll see the staged file summary and the generated message, then a prompt:
Commit with this message? [y/e/r/n]
$EDITORA few options worth knowing:
commitize --dry-run # print the message, don't commit
commitize --summary "Fix typo" # tell the LLM what the main change is
commitize --model gpt-4o # override the model for this run
commitize release -o CHANGELOG.md # changelog since the last release
commitize config show # effective config and where it came from
Add a .commitize-context.md at your repo root to tell the model about your scopes and conventions. See the README for configuration and custom providers.