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

Uploaded Python 3

File details

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

File metadata

  • Download URL: gitcommit_cli-2.0.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.0.0.tar.gz
Algorithm Hash digest
SHA256 a1480b002a6823b3d2c309cc850004f5dfa6094c2a21ea156f0b80fb84f24cc1
MD5 cc3a7ff37dc60009a652c17f94ebd4e6
BLAKE2b-256 63b6c4618a2cd37e929689ddaa5474c4d72b1e0c227fdf00d99c2aec752be09d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gitcommit_cli-2.0.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.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6ad6d882e496a2b19eeb6f986d4daeb4a16aa935b94a6bbdfa8587fe5d6f9609
MD5 1a06f6738221afea700735fb2d34e8fa
BLAKE2b-256 ad821cc5858143c79d927a53f1bc7e70dffab377c422e0e666b4fb7761f4f9e1

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