A simple CLI tool that uses LLMs to automatically generate meaningful commit messages from your staged changes.
Project description
gcmt
A simple CLI tool that uses LLMs to automatically generate meaningful & conventional commit messages from your staged changes, while also allowing you to edit the message according to your instructions.
Using the Hugging Face Inference API's generous free tier, you can generate commit messages without incurring additional $$$.
Installation
pip install gcmt
Be sure to set your Hugging Face access token as an environment variable:
export HF_TOKEN="<your-token>"
You can get an access token here after signing up for a Hugging Face account.
Usage
# Generates a commit message for your staged changes
gcmt
# Generates a commit message and commits them automatically, no additional input required
gcmt --auto-commit
# Choose a different model to generate the commit message. List of models [here](https://huggingface.co/docs/api-inference/supported-models)
gcmt --model_name meta-llama/Meta-Llama-3-70B-Instruct
Commands
After generating a commit message, you'll be prompted with several options:
c: Commit the changes with the generated messagecp: Copy the generated message to clipboarde "<instructions>": Edit the commit message according to your instructions (e.g.,e "make it more concise")r: Re-generate a new commit messagea: Abort the commit process
🎉 Fun Fact: All of the commit messages in this project were generated using gcmt :)
Project details
Release history Release notifications | RSS feed
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 gcmt-1.0.0.tar.gz.
File metadata
- Download URL: gcmt-1.0.0.tar.gz
- Upload date:
- Size: 1.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb7eb26b3be8a57cd95d1092f8fa65f712fe70bec435500a225847580c74f9a9
|
|
| MD5 |
c0114828c490e3b77c9168bd84837656
|
|
| BLAKE2b-256 |
bd216d490a12469f2a263cddff0bc039d5df8012ee568bc3bedce285189988de
|
File details
Details for the file gcmt-1.0.0-py3-none-any.whl.
File metadata
- Download URL: gcmt-1.0.0-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60cfd0441672b0142f501b83219649deb8e442ff2d4ebc8fd96761c472b58042
|
|
| MD5 |
19b1139883a87ef3bf41f8cc783e8395
|
|
| BLAKE2b-256 |
12b6265890ed6b35d02aaa3e043e9f54b7d0349a036f123a0930500062b68c66
|