Skip to main content

AI-powered Conventional Commit generator using Ollama

Project description

commithink

PyPI

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.2.tar.gz (6.7 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.2-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: commithink-0.1.2.tar.gz
  • Upload date:
  • Size: 6.7 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.2.tar.gz
Algorithm Hash digest
SHA256 ac20ed8f4482e76b885601da742c30f0fab7a27538cd689e003257e7573d86b8
MD5 7fe65b326cff307e6d31b38a1d8c624a
BLAKE2b-256 0bb79f6ad3152de62f228e29c494c2cdaee041f2998251ef925b401a9cb8f251

See more details on using hashes here.

File details

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

File metadata

  • Download URL: commithink-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7e2b888cc46be6e8ca62b52252a2d994804afe3d81da199678dd6c9dfd794ac5
MD5 b97fc4c560e7d87efeff82e9478ec5ca
BLAKE2b-256 eb4b0712053c6964fd5ab6192f8792867016caecdde3651d487fb0cd9db3ce90

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