Local LLM Powered

Commit messages
written by AI

Stage your changes, run one command, and get a meaningful commit message generated by a local LLM. No API keys. No cloud. Everything on your machine.

terminal
$ git add .
$ commit-msg-ai

Staged files:
M  src/auth.py
A  src/middleware.py

Generating commit message with llama3.2...

──────────────────────────────────────────────────
feat: add JWT authentication middleware
──────────────────────────────────────────────────

Commit with this message? [Y/n] y
[main 3a1b2c3] feat: add JWT authentication middleware
 2 files changed, 45 insertions(+), 3 deletions(-)

Simple by design

One command. No configuration files. No cloud dependencies. Just good commit messages.

100% Local

Runs entirely on your machine via Ollama. Your code never leaves your computer. No API keys or subscriptions needed.

One Command

Just type commit-msg-ai after staging. It reads the diff, generates a message, and asks for confirmation.

Configurable

Set your preferred model once with commit-msg-ai config. Override per-run with --model.

Clean Format

Messages always use feat: fix: bc: prefixes. No scopes, no noise. Consistent across your team.

Any Ollama Model

Use llama3.2, mistral, qwen2.5-coder, or any model from the Ollama library. Switch models in seconds.

Zero Lock-in

Open source, MIT licensed. No accounts, no telemetry, no vendor lock-in. Just a Python package you install and run.

How it works

Three steps. Under 10 seconds.

1

Stage your changes

git add .
2

Run commit-msg-ai

commit-msg-ai
3

Confirm & commit

Commit? [Y/n] y

Get started in 2 minutes

Install Ollama, pull a model, install commit-msg-ai. Done.

1

Install Ollama

macOS
$ brew install ollama

Linux: curl -fsSL https://ollama.com/install.sh | sh

2

Pull a model

# See available models
$ ollama list

# Pull one (lightweight, ~2GB)
$ ollama pull llama3.2

Browse all models at ollama.com/library

3

Install commit-msg-ai

$ pip install commit-msg-ai
4

Configure your model (optional)

# Set default model
$ commit-msg-ai config model qwen2.5-coder

# Verify
$ commit-msg-ai config
model = qwen2.5-coder

Stop writing commit messages manually

Install commit-msg-ai and let your local LLM handle the boring stuff.

terminal
$ pip install commit-msg-ai