commithink is an AI-powered CLI tool that generates clean, Conventional Commit messages by analyzing your staged Git changes.
It uses a local LLM via Ollama, works fully offline, and guides you through an interactive workflow so you always stay in control.
AI suggests. You decide.
- AI-generated commit messages (local, via Ollama)
- Follows Conventional Commits
- Interactive mode (accept, regenerate, edit, change type)
- Uses staged changes (
git diff --cached) - No cloud APIs, no API keys
- Project-level configuration
- Fully offline
- Python >= 3.10
- Git
- Ollama installed and running locally (ollama.com)
After installation, make sure Ollama is running and that you have at least one model available.
pipx installs CLI tools globally in isolated environments.
pipx install commithinkpython -m pip install commithinkStage your changes as usual:
git add .Then run:
commithinkcommithink will analyze the staged diff and guide you through an interactive flow to produce the final commit message.
| Key | Action |
|---|---|
a |
Accept and commit |
r |
Regenerate the message |
e |
Edit the message manually |
t |
Change commit type |
q |
Abort |
You can optionally provide a short description of your changes:
commithink "fix validation on user registration"This helps the model generate a more accurate message.
To generate a commit message without committing:
commithink --dry-runcommithink supports project-level configuration via a .commithink.toml file in the repository root.
commithink --config model=qwen2.5-coder:3b
commithink --config language=englishThis creates or updates the following file:
model = "qwen2.5-coder:3b"
language = "english"- CLI options (
--model,--lang) .commithink.toml- Built-in defaults
fix: handle user registration errors correctly
commithink is designed to:
- reduce cognitive load
- improve commit quality
- keep the developer in control
AI assists — the final decision is always yours.