Auto-generate git commit messages
Project description
Gen Commit
Gen Commit automatically generate git commit messages. I'm lazy and don't like to write commit messages. Inspired by scommit.
Usage
gencommit works exactly like git commit, but it generates the commit message for you.
gencommit
is the same as
git commit -m "..." -m "..."
but with a generated commit message.
You can also pass in the same arguments as git commit.
gencommit -a
is the same as
git commit -a -m "..." -m "..."
I recommend aliasing it, personally I alias it to gc
. You can do this by adding the following to your shell configuration file (.zshrc
, .bashrc
, etc.)
alias gc="gencommit"
Installation
Prerequisites:
- Python 3.11+
Install the gen-commit package using pip:
pip install gen-commit
Once you have it installed, initialize gencommit
gencommit --init
Go to ~/.gen-commit
and add your OpenAI or Anthropic API key.
Configuration
MODEL=<provider:model (i.e. openai:gpt-4o or anthropic:claude-3-haiku-20240307)>
OPENAI_API_KEY=<your openai api key>
ANTHROPIC_API_KEY=<your anthropic api key>
At the moment only OpenAI and Anthropic are supported.
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
File details
Details for the file gen_commit-0.4.5.tar.gz
.
File metadata
- Download URL: gen_commit-0.4.5.tar.gz
- Upload date:
- Size: 240.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61af0f56d9aeb2e5db2f3f417dd113b38bb269fc75e4be037cc0b30970c855ec |
|
MD5 | 8ac8c761bf3aa3553334d43e231bf16c |
|
BLAKE2b-256 | 6a06fabe4fc2b2d28f7a3f7c4ebf56f5220b4f5110dd35044a89262a82bfada5 |
File details
Details for the file gen_commit-0.4.5-py3-none-any.whl
.
File metadata
- Download URL: gen_commit-0.4.5-py3-none-any.whl
- Upload date:
- Size: 7.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 94439460a507110309e0eed485c49cebe0d874db5ca8613f141508ea03ae7ac5 |
|
MD5 | 7fbaeb27fd2da05a3b2d1dd93b891c63 |
|
BLAKE2b-256 | 21220ae3bb2f8348539fa3b7ddc67f6f45b0cec821772d0cd4627b2d0f6afa00 |