🤖 komit
AI-assisted Git commit messages from your staged changes. Komit reads the diff, recent commit history, changed files, and—optionally—the current branch, then suggests a commit message you can review before committing.
It runs locally by default with Ollama and also supports OpenAI-compatible providers.
Highlights
- Provider-based LLM integration — use Ollama or an OpenAI-compatible API through one configuration surface.
- Context-aware messages — uses staged diffs, modified files, recent commits, and branch-derived type/scope hints.
- Three output styles — Conventional Commits, simple one-line messages, or detailed messages with bullet points.
- Large-diff support — allocates context per file and offers
--deepmode 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
include_branch_name = true
The main configuration options are provider, model, style, ollama_url, base_url, max_diff_length, timeout, and include_branch_name.
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
Metadata
Release files for komit 1.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| komit-1.0.4.tar.gz | 39.5 kB | Without provenance | Details for komit-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| komit-1.0.4-py3-none-any.whl | Python 3 | none | any | Details for komit-1.0.4-py3-none-any.whl |
Total release size: 61.6 kB
Release files / komit-1.0.4.tar.gz
| Download URL | komit-1.0.4.tar.gz |
|---|---|
| Size | 39.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2155826823b945304f0db399d2590f1c53ec6b44b181086d18d3475bb40a42fc
|
|
BLAKE2b-256 checksum How to use checksums |
7a96515ef8dde6d4af2de7cd00c9508b749c30f804abe46360def919df1dd52a
|
| 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.4-py3-none-any.whl
| Download URL | komit-1.0.4-py3-none-any.whl |
|---|---|
| Size | 22.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5644766da80fb55fb19e1a19926d7d264f2b86610bab52c9013f41e2c83c4452
|
|
BLAKE2b-256 checksum How to use checksums |
5bd75c31cec0c241177ca1445599cfdab7f09c738d3192e7a6b1483642f3a0be
|
| 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.4
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.