AI-generated Conventional Commits from your git diff. Point it at your staged and unstaged changes and it writes the commit message, shows it to you, and (with your OK) commits and pushes.
Bring your own AI provider: Gemini, OpenAI, Anthropic, or a local Ollama.
$ commitme
Generating commit message (anthropic/claude-haiku-4-5)...
feat(auth): add token refresh on 401
Retry the request once with a refreshed access token when the API
returns 401, so short-lived sessions no longer surface transient
auth failures to the user.
Commit with this message? [Y/n/e(dit)]
# from a local checkout
cargo install --path .
# or build and copy the binary
cargo build --release
cp target/release/commitme ~/.local/bin/This installs a commitme command. Requires a Rust toolchain (rustup) to build.
commitme # generate a message, confirm, commit, offer to push
commitme commit # same as above (explicit subcommand)
commitme providers # list providers and show the active one
commitme -p openai # one-off provider override
commitme -m gpt-4o # one-off model override
commitme -y # non-interactive: commit and push without prompts
commitme --no-push # commit only
commitme --no-sign-off # skip the Signed-off-by trailer
commitme --gpg-sign # GPG-sign the commitThe flow:
- Collects your staged and unstaged diffs plus untracked file names.
- Sends them to your configured AI provider to draft a Conventional Commit.
- Shows the message; you accept (
Y), reject (n), or edit (e) it in$EDITOR. - Stages everything (
git add -A), commits (with-ssign-off by default), and offers to push to the current branch's upstream.
Precedence (highest wins): CLI flag → environment variable → config file → default.
~/.config/commitme/config.toml (or $XDG_CONFIG_HOME/commitme/config.toml):
provider = "anthropic"
model = "claude-haiku-4-5" # optional; omit to use the provider's default| Variable | Purpose |
|---|---|
commitme_PROVIDER |
Default provider (gemini/openai/anthropic/ollama) |
commitme_MODEL |
Default model |
Each provider reads its own credentials from the environment.
| Provider | Default model | Credentials / config |
|---|---|---|
gemini |
gemini-3.6-flash |
GEMINI_API_KEY or GOOGLE_API_KEY |
openai |
gpt-4o-mini |
OPENAI_API_KEY; optional OPENAI_BASE_URL (OpenAI-compatible endpoints) |
anthropic |
claude-haiku-4-5 |
ANTHROPIC_API_KEY |
ollama |
llama3.2 |
OLLAMA_HOST (default http://localhost:11434) — no key needed |
The default provider is gemini. Set one that suits you in the config file.
Commit-message generation is a small, frequent task, so the cloud defaults are the
fast, low-cost tiers. Point model at a stronger model (e.g. claude-sonnet-5,
gpt-4o) if you want richer messages.
Colour output follows NO_COLOR and is disabled when stdout is not a TTY.
cargo build # debug build -> target/debug/commitme
cargo build --release # optimized -> target/release/commitme
cargo clippy # lintsMIT