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.2.0.tar.gz (6.3 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.2.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

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

Hashes for commitai_cli-0.2.0.tar.gz
Algorithm Hash digest
SHA256 aa4909d9641a537c3d5b4654e07b52a226d819f82f37167bbc383990ea333267
MD5 d508f68d0ebb4f17652381597b080e42
BLAKE2b-256 209c0c2eb016d5001bf870ae5a86b9ed755397a131d644ccd622549d0fd7745c

See more details on using hashes here.

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

Hashes for commitai_cli-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0e1ac000f4ffc656d7a0ec508ef397a554fdd4eafb821e0ea16d4f0a3f4336c9
MD5 8a04cbe9af75c013197f6346f4114b86
BLAKE2b-256 4af17a02e660166b6bcaeb6987c8fdb70a013f073e22a3fa872e9ee22cb26884

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