Local AI-powered git commit message generator using Ollama
Project description
commitai
Local AI-powered git commit message generator using Ollama. Zero API cost, fully local.
Requirements
- Python 3.12+
- Ollama running locally with a model pulled (e.g.
llama3.2:3b)
Installation
pip install commitai
Usage
# Stage your changes first
git add .
# Generate commit message → confirm → commit
commit
# Generate commit message → confirm → commit → push
commit /deploy
At the prompt you can:
Yor Enter — accept and commitn— aborte— open your$EDITORto edit the message before committing
Configuration
Create a .commitrc file in your repo root to override defaults:
model = "llama3.2:3b"
style = "conventional"
protected_branches = ["main", "master"]
How it works
- Reads your staged diff (
git diff --cached) - Strips binary files and scans for secrets
- Sends the diff to your local Ollama instance
- Returns a Conventional Commits message
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
commitai_cli-0.2.0.tar.gz
(6.3 kB
view details)
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 commitai_cli-0.2.0.tar.gz.
File metadata
- Download URL: commitai_cli-0.2.0.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa4909d9641a537c3d5b4654e07b52a226d819f82f37167bbc383990ea333267
|
|
| MD5 |
d508f68d0ebb4f17652381597b080e42
|
|
| BLAKE2b-256 |
209c0c2eb016d5001bf870ae5a86b9ed755397a131d644ccd622549d0fd7745c
|
File details
Details for the file commitai_cli-0.2.0-py3-none-any.whl.
File metadata
- Download URL: commitai_cli-0.2.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e1ac000f4ffc656d7a0ec508ef397a554fdd4eafb821e0ea16d4f0a3f4336c9
|
|
| MD5 |
8a04cbe9af75c013197f6346f4114b86
|
|
| BLAKE2b-256 |
4af17a02e660166b6bcaeb6987c8fdb70a013f073e22a3fa872e9ee22cb26884
|