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 git-aicommit-message

# 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.1.tar.gz (5.6 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.1-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file git_aicommit_message-0.1.1.tar.gz.

File metadata

  • Download URL: git_aicommit_message-0.1.1.tar.gz
  • Upload date:
  • Size: 5.6 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.1.tar.gz
Algorithm Hash digest
SHA256 ef853a0db67b1869a531dee645221c2050810c6e48f0eeca6e095c38b8bcbd9d
MD5 49fc46509cd3fcc7b0fca42f9a736da7
BLAKE2b-256 650f46a632f6ed1acf0e73a6caa57d6af540d68f940eca9a47cb18c04f351c69

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for git_aicommit_message-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7338bb2bc678a4ba5ca4a132bc428f9e3690161ee69707f3d705f5383c94fc14
MD5 c8fdc975f0f43d4c531706e649491179
BLAKE2b-256 e33f26eeae2df248671efa69bb66fe825a82cfe198d0c59ed6ce8c1755829cf9

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