Skip to main content

AI-powered Conventional Commit generator using Ollama

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

commithink-0.1.3.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

commithink-0.1.3-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file commithink-0.1.3.tar.gz.

File metadata

  • Download URL: commithink-0.1.3.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for commithink-0.1.3.tar.gz
Algorithm Hash digest
SHA256 9de7274e3910c9d7b03119825b0cb468fae9ced666be72e2cd6d6c024fd348e2
MD5 5b88537c9e98ca97fddb947e44c8002c
BLAKE2b-256 6454c5a866c7a3e3cc59b9237e125c506c42e1809d6db2edb28410dac1b1dfc3

See more details on using hashes here.

File details

Details for the file commithink-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: commithink-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for commithink-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 51bef5c57b6c627926a5b2acf212e81600bf3957c58a4518fa69f96756041876
MD5 73964212fdd28745a2a79b8ff7a314a3
BLAKE2b-256 4e045714bf3bef63bab9d2fdf75b1037a7a72a907029d000116066cd432fed81

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page