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.1.tar.gz (1.5 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.1-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file gcmt-1.0.1.tar.gz.

File metadata

  • Download URL: gcmt-1.0.1.tar.gz
  • Upload date:
  • Size: 1.5 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.1.tar.gz
Algorithm Hash digest
SHA256 92f76be65f06f30bb8541cf5984dfcd3fecb99f9f1262c54e38b79f7caca78a8
MD5 64af1d660e85edce32e6129ae8772026
BLAKE2b-256 55b966c1195e2d509d1c7dec4f100318b5aaed147952318bcf99196d05934257

See more details on using hashes here.

File details

Details for the file gcmt-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: gcmt-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 abdaf0fa93aace97a7c27e8acb8de9101744252e969f75a5b77aa4ec38a6c566
MD5 490e75ca4e6de6e0955ab9810456b930
BLAKE2b-256 e3c98d587d7a13dfa98569cad3b6273e7395d9a7ea7efc0daea945d36612a0e3

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