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+
Recommended: Homebrew (macOS and Linux)
brew tap raghavpillai/gen-commit https://github.com/raghavpillai/gen-commit.git
brew install gen-commit
Python
Install the gen-commit package using pip:
pip install gen-commit
If you get
error: externally-managed-environment
This means Python now doesn't want you to install this as a system-wide package. You can install it using pipx
or venv
, or be lazy and install it via:
pip3 install gen-commit --break-system-packages
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.5.2.tar.gz
.
File metadata
- Download URL: gen_commit-0.5.2.tar.gz
- Upload date:
- Size: 241.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | edfb64acb561f2fafe2d31c49592137823e3a5324855104e27f602ead08b7c58 |
|
MD5 | 6e8b1bf2a505ab9ecb87fcb4714a21d9 |
|
BLAKE2b-256 | c5af1e748cdad3cb7c772586591c19caff24a576a604df9e99f2f9d69fea3b59 |
File details
Details for the file gen_commit-0.5.2-py3-none-any.whl
.
File metadata
- Download URL: gen_commit-0.5.2-py3-none-any.whl
- Upload date:
- Size: 7.9 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 | a41f447b34b75a3f68df42ba7ba8ba2517a32c39c88985ce442e53d629b90072 |
|
MD5 | 09b99ee0b01810fea2747f11a57212cb |
|
BLAKE2b-256 | c212179aa32589f6f6212cbb1b0c11f3670ef2cf02afe57d622665538d3911f7 |