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
-
Stage your changes as usual:
git add .
-
Generate and commit with AI:
gitcommit-cli commit -
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
- Analyzes your staged diff
- Sends the diff to Hackclub AI for analysis
- 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
- Conventional Commits format(
- Formats the output beautifully in your terminal
Requirements
- Python 3.8+
- Git repository
- Internet connection (for AI analysis)
curlcommand 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-instructvia 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
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Make your changes
- Test thoroughly
- Use
gitcommit-clito generate your commit message! 😉 (see what I did) - Submit a pull request
License
MIT License - see LICENSE file for details.
Credits
- Built with ❤️ by Nirvaan
- Powered by Hackclub AI
- Follows Conventional Commits specification
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1480b002a6823b3d2c309cc850004f5dfa6094c2a21ea156f0b80fb84f24cc1
|
|
| MD5 |
cc3a7ff37dc60009a652c17f94ebd4e6
|
|
| BLAKE2b-256 |
63b6c4618a2cd37e929689ddaa5474c4d72b1e0c227fdf00d99c2aec752be09d
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ad6d882e496a2b19eeb6f986d4daeb4a16aa935b94a6bbdfa8587fe5d6f9609
|
|
| MD5 |
1a06f6738221afea700735fb2d34e8fa
|
|
| BLAKE2b-256 |
ad821cc5858143c79d927a53f1bc7e70dffab377c422e0e666b4fb7761f4f9e1
|