Skip to main content

🤖 komit

AI-assisted Git commit messages from your staged changes. Komit reads the diff, recent commit history, and changed files, then suggests a commit message you can review before committing.

It runs locally by default with Ollama and also supports OpenAI-compatible providers.

PyPI Python License Downloads

Highlights

  • Provider-based LLM integration — use Ollama or an OpenAI-compatible API through one configuration surface.
  • Context-aware messages — uses staged diffs, modified files, and recent commits.
  • Three output styles — Conventional Commits, simple one-line messages, or detailed messages with bullet points.
  • Large-diff support — allocates context per file and offers --deep mode for file-by-file summaries.
  • Safe review workflow — preview with --dry-run, explain changes with --explain, regenerate, edit, or cancel before committing.
  • Validated output — rejects malformed model responses and checks Ollama availability and local model installation before generation.
  • Portable CLI — install with pip, pipx, Homebrew, a binary, PowerShell, or Nix; supports Linux, macOS, and Windows.

Quick start

Install Komit and pull a local model:

pipx install komit
ollama pull qwen2.5:7b

Stage changes and run Komit:

git add .
komit

Komit shows the staged files and proposed message, then lets you accept, reject, edit, or regenerate it. Use it as a Git alias if preferred:

git config --global alias.ai '!komit'
git ai

Providers

Ollama is the default and requires a running Ollama server with the selected model installed:

komit --provider ollama --model qwen2.5:7b

For an OpenAI-compatible server, select the provider and set its base URL:

komit \
  --provider openai_compatible \
  --base-url http://localhost:8080/v1 \
  --model your-model

Useful commands

komit --dry-run       # generate without committing
komit --explain       # explain staged changes without committing
komit --deep          # summarize files before generating the message
komit --style simple  # choose conventional, simple, or detailed output
komit --model mistral:7b
komit init            # create the user configuration file
komit update          # update Komit
komit uninstall       # remove Komit

Configuration

Run komit init to create ~/.config/komit/config.toml (platform-dependent config directory). CLI options override values from the file.

model = "qwen2.5:7b"
style = "conventional"
provider = "ollama"
ollama_url = "http://localhost:11434"
base_url = "http://localhost:8080/v1"
max_diff_length = 4000
timeout = 60

The main configuration options are provider, model, style, ollama_url, base_url, max_diff_length, and timeout.

Download and installation options

Prebuilt binaries

Download the latest release from GitHub Releases:

Platform Download
Linux x86_64 komit-linux-x86_64
macOS Apple Silicon komit-macos-arm64
Windows x86_64 komit-windows-x86_64.exe
macOS Intel Use pip, Homebrew, or the installer below; no Intel binary is currently published.

On Linux and macOS, make the downloaded binary executable and place it on your PATH:

chmod +x komit-*
sudo mv komit-* /usr/local/bin/komit

Installers and package managers

# pip / pipx
pip install komit
pipx install komit

# Homebrew
brew tap glemiu6/komit && brew install komit

# Linux/macOS installer
curl -fsSL https://raw.githubusercontent.com/glemiu6/komit/master/scripts/install.sh | bash

# Nix
nix profile install github:glemiu6/komit
nix run github:glemiu6/komit

Windows users can run the PowerShell installer:

irm https://raw.githubusercontent.com/glemiu6/komit/master/scripts/install.ps1 | iex

Nix supports Linux and macOS, including Intel and Apple Silicon systems. Nix-managed installations should be updated or removed with Nix rather than komit update or komit uninstall.

Requirements

  • Python 3.13+ for Python installations
  • A configured LLM provider
  • For Ollama: Ollama running locally or at the configured URL, with a model pulled

License

Apache License 2.0

Metadata

Release files for komit 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for komit 1.0.5
File Size Uploaded Provenance Actions
komit-1.0.5.tar.gz 38.2 kB Without provenance Details for komit-1.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for komit 1.0.5
File Interpreter ABI Platform Actions
komit-1.0.5-py3-none-any.whl Python 3 none any Details for komit-1.0.5-py3-none-any.whl

Total release size: 59.2 kB

Release files / komit-1.0.5.tar.gz

Download URL komit-1.0.5.tar.gz
Size 38.2 kB
Tags Source
SHA-256 checksum
How to use checksums
26f63538a1f229338a6f925eb766e64bc4694c2ab3584f5649cbd5a7a7d26d7f
BLAKE2b-256 checksum
How to use checksums
2f70b7defa04ec9b928d33b69966954bdddba17949e44583f4a3e0acfb9f02eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / komit-1.0.5-py3-none-any.whl

Download URL komit-1.0.5-py3-none-any.whl
Size 21.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
545ab52c873c9c8e86ddd961e7e9d1866b27e01839efa6c13afa8fa40d4e1269
BLAKE2b-256 checksum
How to use checksums
afe32aa4e2e66352d572353d2f49cefe4246487c737da8e435ded10b0a6a9103
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for komit 1.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.5 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page