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.1.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.1-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gitcommit_cli-2.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 f032103b3d0a674273b0f743842505b959a755997c4839f2d4737859e7978b12
MD5 0a833655f49cf76f38582fb8ec4576b7
BLAKE2b-256 abca4099250eac1ba8f2969db3858e7241dc115cf6171e9b81cad78c4f77ae68

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gitcommit_cli-2.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3d350391986844c60940a3ab5aacf67a2f6bee5abfa80b14d76f76fc8f72612d
MD5 c50d0d73458aa69c59565e755ac91f5d
BLAKE2b-256 f85ec233ea606df7b3b392ea9379e44f2f6402468392f17e55ddb35e6a7cf862

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