Skip to main content

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:

  • Y or Enter — accept and commit
  • n — abort
  • e — open your $EDITOR to 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

  1. Reads your staged diff (git diff --cached)
  2. Strips binary files and scans for secrets
  3. Sends the diff to your local Ollama instance
  4. Returns a Conventional Commits message

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

commitai_cli-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.

commitai_cli-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file commitai_cli-0.1.0.tar.gz.

File metadata

  • Download URL: commitai_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 5.5 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

Hashes for commitai_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 24dfdbf046df983b440b55f6b5ec72b8c852751708237fe12a5f0106647fea33
MD5 0f9a68e19010eddc381defcc64772826
BLAKE2b-256 f6fbbfba18a71d47d96fdba892f3af975a8abfec44c5c152b789545409c1874f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: commitai_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 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

Hashes for commitai_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5cbac259902c8835b2400ffe69bcf347a68dfa01edf46a049a74b30e8d206f5b
MD5 6d7a0577ff6b1a00eaa968989e85e8ef
BLAKE2b-256 805a7e25c4f1a977244eedaa0d408e66ed02ae359679a866ce02b688d4d7b070

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