AI-powered git commit message generator using local LLMs
Project description
🤖 komit
AI-powered git commit message generator using local LLMs via Ollama. No API keys, no internet required — runs completely locally and privately.
📍 View the roadmap · Open an issue · Changelog
Features
- 🧠 Local LLM — uses Ollama, no API keys needed
- 📝 Multiple commit styles — conventional, simple, detailed
- 🔄 Regenerate — not happy? generate a new message instantly
- ✏️ Edit before commit — open your editor to tweak the message
- ⚙️ CLI flags — control style, model, and more from the command line
- 🔔 Auto update check — notifies you when a new version is available
- 🌍 Universal — works via pip, binary, or shell script
- ⚡ Fast — runs on your machine, no network calls to external APIs
Requirements
- Ollama installed and running
- A local model pulled (e.g.
ollama pull qwen2.5:7b)
Recommended models
| Model | Size | Best for |
|---|---|---|
qwen2.5:7b |
4.7GB | Best quality |
llama3.2:3b |
2.0GB | Fastest |
mistral:7b |
4.1GB | Good balance |
ollama pull qwen2.5:7b
Installation
Linux / macOS — one line
curl -fsSL https://raw.githubusercontent.com/glemiu6/komit/master/scripts/install.sh | bash
pip
pip install komit
pipx (recommended for CLI tools)
pipx install komit
Download binary manually
Download for your platform from GitHub Releases:
| Platform | Binary |
|---|---|
| Linux x86_64 | komit-linux-x86_64 |
| macOS Apple Silicon | komit-macos-arm64 |
| Windows | komit-windows-x86_64.exe |
Intel Mac users: use
pip install komitinstead.
# Linux/macOS
chmod +x komit-*
sudo mv komit-* /usr/local/bin/komit
Setup
Git alias (recommended)
git config --global alias.ai '!komit'
Now you can use git ai as a shortcut.
Usage
# Stage your changes
git add .
# Generate a commit message
komit
# Or via git alias
git ai
CLI flags
komit [--style STYLE] [--model MODEL] [--ollama-url URL] [--max-diff N]
| Flag | Options | Default | Description |
|---|---|---|---|
-s, --style |
conventional, simple, detailed |
conventional |
Commit message style |
-m, --model |
any Ollama model | qwen2.5:7b |
Model to use |
-u, --ollama-url |
any URL | http://localhost:11434 |
Ollama server URL |
--max-diff |
integer | 4000 |
Max diff length sent to model |
Examples
komit --style simple
komit --model llama3.2:3b
komit --style detailed --model mistral:7b
komit --ollama-url http://192.168.1.10:11434
komit --max-diff 2000
Interactive prompt
Staged files (3):
- src/auth.py
- tests/test_auth.py
- README.md
Generating commit message... (style: conventional, model: qwen2.5:7b)
Suggested message:
feat: add JWT authentication with refresh token support
Use this message? (y/n/e to edit/r to regenerate):
| Key | Action |
|---|---|
y |
Commit with the suggested message |
n |
Cancel |
e |
Open editor to modify the message |
r |
Regenerate a new message |
Commit styles
Conventional (default)
feat: add user authentication
fix: resolve null pointer in login flow
docs: update API reference
Simple
Add user authentication
Fix null pointer in login flow
Update API reference
Detailed
feat: add user authentication
- Add JWT token generation
- Add password hashing with bcrypt
- Add refresh token support
Update
komit automatically checks for updates on startup and notifies you when a new version is available.
komit update
Uninstall
All platforms — removes binary, config, and git alias
komit uninstall
Contributing
See CONTRIBUTING.md for setup instructions and guidelines.
- Fork the repo
- Create a feature branch (
git checkout -b feature-name) - Make your changes and add tests
- Commit your changes (
komit😉) - Push and open a Pull Request
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file komit-0.2.7.tar.gz.
File metadata
- Download URL: komit-0.2.7.tar.gz
- Upload date:
- Size: 14.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5dd4071ebbc04a1bbba367d72f606ae0be558de592640efadaa69068d064cdc7
|
|
| MD5 |
7111d181779f81b9674a2f9e0c57cafd
|
|
| BLAKE2b-256 |
56cc32b27e5e32f79186157a41f4c8ae2a8f80cac1e37b8ff22eb09dda2844bf
|
File details
Details for the file komit-0.2.7-py3-none-any.whl.
File metadata
- Download URL: komit-0.2.7-py3-none-any.whl
- Upload date:
- Size: 13.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
15ed2273ec5448b57234f6b5e31b653b01c2cf108d93cabca6db84ba9b266f87
|
|
| MD5 |
0f9d0342afbe762af38c1e8d078589d7
|
|
| BLAKE2b-256 |
7ab17649ef01292a2ac5e85502eda99fac8ec06bc739d21dfa79048abb502829
|