AI-powered git commit message generator using Ollama
Project description
git-ai-commit
Generate smart commit messages using AI — powered by Ollama (local, private).
Prerequisites
- Python 3.8+
- Ollama installed and running
Install everything in one command
curl -fsSL https://raw.githubusercontent.com/rachid-traore/git-ai-commit/main/install.sh | sh
This script will automatically install Ollama, pull the mistral model, and install git-ai-commit.
Manual installation
1. Install Ollama
| OS | Command |
|---|---|
| Mac | brew install ollama |
| Linux | curl -fsSL https://ollama.com/install.sh | sh |
| Windows | ollama.com/download |
2. Start Ollama and pull the model
ollama serve &
ollama pull mistral
3. Install git-ai-commit
pip install git-ai-commit
Usage
# Stage your changes
git add .
# Generate and commit
git ai-commit
# Open message in $EDITOR before committing
git ai-commit --edit
Example output
🤖 Analyse du diff en cours...
→ feat: add user authentication via JWT
[Y] Valider [e] Éditer [n] Annuler :
How it works
- Reads your staged diff (
git diff --cached) - Detects commit type instantly via heuristics (
feat,fix,chore...) - Sends diff to local Ollama (
mistralmodel) - Proposes a Conventional Commits message
- You validate, edit, or cancel
Privacy
Your code never leaves your machine. Ollama runs 100% locally.
License
MIT
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 git_aicommit_message-0.1.0.tar.gz.
File metadata
- Download URL: git_aicommit_message-0.1.0.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
09ecff390785509b51f4a7af61de658ebc8feab78cbaab6082948ffcfe17aaa0
|
|
| MD5 |
a3ceda72077d6e1e6327b1b105392bb0
|
|
| BLAKE2b-256 |
c8aebe996c24be86d9abe43f3eef8f249cfb8463e83ddd55102daab06cb42772
|
File details
Details for the file git_aicommit_message-0.1.0-py3-none-any.whl.
File metadata
- Download URL: git_aicommit_message-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f9fc22aaa473225800228eb6364923e1b0210f7cc208363706e9e0081520a101
|
|
| MD5 |
10ba3e1b78947d8279ffd70e50d5bca7
|
|
| BLAKE2b-256 |
6605e3c3b3765ae20a1c0988ed4a4a8168a851357aa006fab1069e4aced7490f
|