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.1.0.tar.gz (3.4 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.1.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: git_commit_msg_ai-1.1.0.tar.gz
  • Upload date:
  • Size: 3.4 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.1.0.tar.gz
Algorithm Hash digest
SHA256 d29daff4e7df92dbb431baa850ba9a5ac7c914e2b828a151e9725992d9a75a95
MD5 7ecf0fc604a739b6da15d381655f3d52
BLAKE2b-256 7e44a475b92db71c1718ad222634c3d48a401294170bfe3cedea80411624627d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for git_commit_msg_ai-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3956b94794c213643bd1b714ebab970893b9dc0001275c6629d334edf76a6015
MD5 c7d91e1585e86b82db8a937ea3720467
BLAKE2b-256 56027c1ac4508f4d80912ce9249f5e8a4c5f010434eaeb8e028aeb50fb140ae6

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