Skip to main content

From staged changes to perfect commits in one command. AI-powered commit message generation that actually understands your code.

Project description

gitcommit-cli

Auto-generate meaningful git commit messages using AI-powered analysis of your staged changes.

Features

  • AI-Powered: Automatically generates commit messages- no API key required -via Hackclub’s free AI API (exclusive to members).
  • 📝 Conventional Commits: Follows the Conventional Commits specification
  • 🔎 Preview Mode: You stay in control: preview every AI-generated commit message before it touches your repo.
  • 🎨 Beautiful CLI: Clean ASCII art and formatted output(I like this part a lot)

Installation

You can install gitcommit-cli with pip by running the following command:

pip install gitcommit-cli

Quick Start

  1. Stage your changes as usual:

    git add .
    
  2. Generate and commit with AI:

    gitcommit-cli commit
    
  3. Review the generated message and either commit or cancel

Usage

Generate & Commit

# Interactive Mode - preview & confirm before commiting or canceling

gitcommit-cli commit

# Skip confirmation and commit directly

gitcommit-cli commit --skip-confirmation

Generate Message Only

# Just generate the message without committing

gitcommit-cli commit_msg

Example Output

Analyzing staged changes...

The following is the commit message our CLI generated:

 | feat(cli): add AI-powered commit message generation
 | 
 | - Implemented automatic commit message generation using Hack Club AI
 | - Added support for conventional commits format
 | - Includes preview mode for user confirmation

Continue with the commit: (y/n)

How it works

  1. Analyzes your staged diff
  2. Sends the diff to Hackclub AI for analysis
  3. Generates a commit message message following best practices:
    • Conventional Commits format(feat:, fix:, etc.)
    • Clear, concise subject line (≤80 characters)
    • Descriptive body explaining what and why
  4. Formats the output beautifully in your terminal

Requirements

  • Python 3.8+
  • Git repository
  • Internet connection (for AI analysis)
  • curl command available in PATH

Configuration

The tool works out of the box with no configuration needed. It uses:

  • AI Model: meta-llama/llama-4-maverick-17b-128e-instruct via Hack Club AI
  • Commit Format: Conventional Commits specification
  • Temperature: 0.0 (deterministic output)

You can customize the AI model by setting the HACKCLUB_MODEL environment variable:

export HACKCLUB_MODEL="your-preferred-model"
gitcommit-cli commit

Examples

Feature Addition

$ git add new_feature.py
$ gitcommit-cli commit

Output: feat(parser): add array support for configuration files

Bug Fix

$ git add bug_fix.py
$ gitcommit-cli commit

Output: fix(auth): resolve token validation edge case

Documentation

$ git add README.md
$ gitcommit-cli commit

Output: docs: update installation instructions and examples

Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature-name
  3. Make your changes
  4. Test thoroughly
  5. Use gitcommit-cli to generate your commit message! 😉 (see what I did)
  6. Submit a pull request

License

MIT License - see LICENSE file for details.

Credits


Make your commit messages meaningful without the mental overhead!

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

gitcommit_cli-2.1.0.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gitcommit_cli-2.1.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file gitcommit_cli-2.1.0.tar.gz.

File metadata

  • Download URL: gitcommit_cli-2.1.0.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for gitcommit_cli-2.1.0.tar.gz
Algorithm Hash digest
SHA256 3af473326db85b34a1cfead8c103c8d255bedfbe3841e35362f7ea2ccf2100ba
MD5 189bae45bf214c5bc85e5966e60254f9
BLAKE2b-256 b777a276a71b929aae62c894e8b2c824af600e0241cc3a58817b497ed2aeedbb

See more details on using hashes here.

File details

Details for the file gitcommit_cli-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: gitcommit_cli-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for gitcommit_cli-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9260270728acec3a5a4d05863744b21b7253d54c13282689b3545d013b150cf9
MD5 9d8ae03657c0d355aa135e71d5d98bf0
BLAKE2b-256 417206b98b8f51cc6e701bc54286c021e30627eebb573fa31798b2234619a99f

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