Skip to main content

AI-powered git commit message generator following Conventional Commits

Project description

git-commit-msg-ai

AI-powered git commit message generator that follows the Conventional Commits specification.

Prerequisites

  • Python 3.9+

  • An Anthropic API key set as an environment variable:

    export ANTHROPIC_API_KEY=sk-ant-...   # macOS/Linux
    
    [System.Environment]::SetEnvironmentVariable('ANTHROPIC_API_KEY', 'sk-ant-...', 'User')   # Windows
    

Installation

pip install git-commit-msg-ai

Usage

Stage your changes, then run the tool from inside any git repository:

git add <files>
git-commit-msg-ai

The tool will:

  1. Read your staged diff
  2. Generate a commit message using Claude AI
  3. Print the message and prompt you to choose:
[a]ccept / [e]dit / [r]eject:
  • a — commits immediately with the generated message
  • e — opens the message in your $EDITOR, lets you modify it, then commits
  • r — exits without committing

Commit message format

Generated messages follow the Conventional Commits specification:

<type>(<optional scope>): <short subject>

- Bullet explaining why this change was made
- Another reason if applicable

For breaking changes, the subject line gets a ! and a footer is added:

feat(api)!: remove deprecated endpoint

- Endpoint was unused and blocking the new auth rollout

BREAKING CHANGE: /v1/legacy is no longer available

Supported types: feat, fix, docs, style, refactor, test, chore

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_commit_msg_ai-1.3.0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

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

git_commit_msg_ai-1.3.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file git_commit_msg_ai-1.3.0.tar.gz.

File metadata

  • Download URL: git_commit_msg_ai-1.3.0.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for git_commit_msg_ai-1.3.0.tar.gz
Algorithm Hash digest
SHA256 2ab165dcf9f51613741f2a92577eded262303cda2f4ddf39c8220005ca8e484d
MD5 e2a2b5fcbe2f90034be7b6486b654cc7
BLAKE2b-256 1d308ca08ff7fa1861bd1ff4e7084cad495ca56a86cb2f6b368776d7f112f8e3

See more details on using hashes here.

File details

Details for the file git_commit_msg_ai-1.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for git_commit_msg_ai-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8ec76c349ad2ebef932aa9bcfabdc6429fe66e6d6351eb81259ce4ca67ec26aa
MD5 771bd1d2b513595339a213cbb1f7df21
BLAKE2b-256 08cf3fc5ba223a2e538b2ab1bd15c6a490e3917fa4ddf1e36eb64639cda2138c

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