Skip to main content

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

  1. Reads your staged diff (git diff --cached)
  2. Detects commit type instantly via heuristics (feat, fix, chore...)
  3. Sends diff to local Ollama (mistral model)
  4. Proposes a Conventional Commits message
  5. You validate, edit, or cancel

Privacy

Your code never leaves your machine. Ollama runs 100% locally.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

git_aicommit_message-0.1.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

git_aicommit_message-0.1.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

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

Hashes for git_aicommit_message-0.1.0.tar.gz
Algorithm Hash digest
SHA256 09ecff390785509b51f4a7af61de658ebc8feab78cbaab6082948ffcfe17aaa0
MD5 a3ceda72077d6e1e6327b1b105392bb0
BLAKE2b-256 c8aebe996c24be86d9abe43f3eef8f249cfb8463e83ddd55102daab06cb42772

See more details on using hashes here.

File details

Details for the file git_aicommit_message-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for git_aicommit_message-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f9fc22aaa473225800228eb6364923e1b0210f7cc208363706e9e0081520a101
MD5 10ba3e1b78947d8279ffd70e50d5bca7
BLAKE2b-256 6605e3c3b3765ae20a1c0988ed4a4a8168a851357aa006fab1069e4aced7490f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page