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.2.0.tar.gz (3.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_commit_msg_ai-1.2.0-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: git_commit_msg_ai-1.2.0.tar.gz
  • Upload date:
  • Size: 3.6 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.2.0.tar.gz
Algorithm Hash digest
SHA256 30d3ee8603ce5db843f42b7b6f360cd3d3ff871ad06052c9c8e0c2f90a792854
MD5 75d30271b188714f39a242c7db03bf99
BLAKE2b-256 f06c2c2aac4fba15e5b12bb43e3bebe11feadb6557821999a2c82654f87cfa8b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for git_commit_msg_ai-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 068bb4327cf159988e2e4fc55b19a08aa5f98b72dc90882910aa851b6f480ff2
MD5 5e57370edc6d76b1effcc4871e25baaf
BLAKE2b-256 4a0adf1e773f22197a67e3681e7078c056051537c4744a6e209adcbce5e685bc

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