Skip to content

leomarss/commithink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

commithink

Local AI License

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.

Features

  • 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

Requirements

  • 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.

Installation

Recommended (pipx)

pipx installs CLI tools globally in isolated environments.

pipx install commithink

Alternative (pip)

python -m pip install commithink

Basic usage

Stage your changes as usual:

git add .

Then run:

commithink

commithink will analyze the staged diff and guide you through an interactive flow to produce the final commit message.

Interactive controls

Key Action
a Accept and commit
r Regenerate the message
e Edit the message manually
t Change commit type
q Abort

Passing a hint

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.

Dry run

To generate a commit message without committing:

commithink --dry-run

Configuration

commithink supports project-level configuration via a .commithink.toml file in the repository root.

Set configuration values

commithink --config model=qwen2.5-coder:3b
commithink --config language=english

This creates or updates the following file:

model = "qwen2.5-coder:3b"
language = "english"

Configuration precedence

  1. CLI options (--model, --lang)
  2. .commithink.toml
  3. Built-in defaults

Example output

fix: handle user registration errors correctly

Philosophy

commithink is designed to:

  • reduce cognitive load
  • improve commit quality
  • keep the developer in control

AI assists — the final decision is always yours.

About

AI-powered CLI tool that generates clean, Conventional Commit messages by analyzing your staged Git changes.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages