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.10+

  • 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 (defaults to notepad on Windows, vi on Linux/macOS), 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.4.1.tar.gz (7.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.4.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: git_commit_msg_ai-1.4.1.tar.gz
  • Upload date:
  • Size: 7.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.4.1.tar.gz
Algorithm Hash digest
SHA256 1fea58147b448715b62ca0f85a3e93ff5ade88cd40b116fc172002236833f111
MD5 c8beaac7aa7aedf4e234b9b40e4f7293
BLAKE2b-256 b37c3460f04276a5b377f9b5d8366db0b446fdee47f5352e219e280dc7bd00d2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for git_commit_msg_ai-1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1824c1992b48b8b87c1ff3be42d42479d8a2311399f2d6f5558ee3d00575297d
MD5 5d0afbacf408a4214e2d2a31e98732ec
BLAKE2b-256 af115e53eb0e6ba66a301808bf565053ab1955e8137ec8bd9044f71a6df9fed6

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