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.
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
- 🌍 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)
Installation
Option 1 — One line install (no Python required)
curl -fsSL https://raw.githubusercontent.com/glemiu6/komit/master/scripts/install.sh | bash
Option 2 — pip
pip install komit
Option 3 — Download binary
Download the binary 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/Mac
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 commit message
komit
# or via git alias
git ai
# or via shell script
./scripts/commit.sh
Interactive prompt
Staged files (3):
- src/auth.py
- tests/test_auth.py
- README.md
Generating commit message...
Suggested message:
feat: add JWT authentication with refresh token support
Use this message? (y/n/e to edit/r to regenerate):
y— commit with the suggested messagen— cancele— open editor to modify the messager— regenerate a new message
Commit Styles
Configure in komitconfig.py or pass as argument:
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
Configuration
Edit komit/komitconfig.py:
@dataclass
class KomitConfig:
model: str = "qwen2.5:7b" # any Ollama model
style: str = "conventional" # conventional, simple, detailed
max_diff_length: int = 4000 # truncate large diffs
ollama_url: str = "http://localhost:11434"
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
Uninstall
./scripts/uninstall.sh
# or
pip uninstall komit
Contributing
- Fork the repo
- Create a feature branch (
git checkout -b feature-name) - Commit your changes (
komit😉) - Push to the branch (
git push origin feature-name) - 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.1.0.tar.gz.
File metadata
- Download URL: komit-0.1.0.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d32ec911e9e1b15a1dcf9b8634f2121457ffd0b7195bcd695d189aed1a991b0
|
|
| MD5 |
6d878f4cdd10ee0c1079662818b4800d
|
|
| BLAKE2b-256 |
daf951895bf68bdf475874667e98944c7cc5b0c3d95015b66e11b60b30cb0037
|
File details
Details for the file komit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: komit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.8 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 |
a54071c79617bd11d1ffdda2d221211e1b586a00d7615904be27a79475411577
|
|
| MD5 |
ae34f56bea7cb74644b3c774bf11b2c8
|
|
| BLAKE2b-256 |
dc03f6f264502fc15ce97a209f08cb776a0fbc21c0f4e99305fdb1401dff61cc
|