Skip to main content

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.

gcmt demo

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 message
  • cp: Copy the generated message to clipboard
  • e "<instructions>": Edit the commit message according to your instructions (e.g., e "make it more concise")
  • r: Re-generate a new commit message
  • a: Abort the commit process

🎉 Fun Fact: All of the commit messages in this project were generated using gcmt :)

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

gcmt-1.0.0.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

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

gcmt-1.0.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

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

Hashes for gcmt-1.0.0.tar.gz
Algorithm Hash digest
SHA256 eb7eb26b3be8a57cd95d1092f8fa65f712fe70bec435500a225847580c74f9a9
MD5 c0114828c490e3b77c9168bd84837656
BLAKE2b-256 bd216d490a12469f2a263cddff0bc039d5df8012ee568bc3bedce285189988de

See more details on using hashes here.

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

Hashes for gcmt-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 60cfd0441672b0142f501b83219649deb8e442ff2d4ebc8fd96761c472b58042
MD5 19b1139883a87ef3bf41f8cc783e8395
BLAKE2b-256 12b6265890ed6b35d02aaa3e043e9f54b7d0349a036f123a0930500062b68c66

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