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.0.tar.gz (7.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.4.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: git_commit_msg_ai-1.4.0.tar.gz
  • Upload date:
  • Size: 7.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.4.0.tar.gz
Algorithm Hash digest
SHA256 d55bbdb20eec302ac784f28c2afbca2eabc1a10461b3b321cf653fde53cde648
MD5 d572b01d8116227ae0ecc0d84dc865b0
BLAKE2b-256 d879a050c8f7726f46762c869f10f24de2edf08bcd1ed60e597844fc39ea6ab8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for git_commit_msg_ai-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fca867aaf325129a5f7e1eeff6b5737da8833970ab99a4e1867e38f3772c7063
MD5 32d402a76fb413122d006d5317634fe1
BLAKE2b-256 9b302f4aef0eb8af1ba934b45735aefdc4adde70a6f1a4771e66ca5742742cc7

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