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.0.0.tar.gz (2.9 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.0.0-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: git_commit_msg_ai-1.0.0.tar.gz
  • Upload date:
  • Size: 2.9 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.0.0.tar.gz
Algorithm Hash digest
SHA256 5b35243ac6f5d3836ee197a3ff8c8b369eea51fa752e6dd78cac01638a77110d
MD5 7a78b542457583f85bb4a3bbc81286ab
BLAKE2b-256 35fc73edad00cb0e1424bfde0aa9517bb43d183d6d2545ac6c513f85b156ab98

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for git_commit_msg_ai-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 88a1885dcb7fa762e360cc8de2321a46ddf770bac1708adbfe4fbbce04e55e87
MD5 48b34d626e496f3c407182cd58a3b36a
BLAKE2b-256 55bf907e23f9562229a08217c7e06185cd73bb8b41b2d92f6bb9da83f99ad245

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