Skip to main content

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.

Wow!


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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gen_commit-0.4.0.tar.gz (240.8 kB view details)

Uploaded Source

Built Distribution

gen_commit-0.4.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file gen_commit-0.4.0.tar.gz.

File metadata

  • Download URL: gen_commit-0.4.0.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

Hashes for gen_commit-0.4.0.tar.gz
Algorithm Hash digest
SHA256 6a0f9d5d3157cabc11f94918c911d9ef7148a9e53f94d84403670577f7ccd7a6
MD5 46a6096d28c9b36eff0874eaee6e6c5f
BLAKE2b-256 1a541469e03d71982d78467be75ec879efd27a04fde21d0d89b4677e0a56ecd3

See more details on using hashes here.

File details

Details for the file gen_commit-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: gen_commit-0.4.0-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

Hashes for gen_commit-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6cc45a48a32c183aa6e0a098cd52ca1e339f8c011517274c1fcfcc8cf265562
MD5 8c71ad312a80921eb9e2d0e4fd5501c3
BLAKE2b-256 b25875039afb80054226452dd51275babf7f897672739af5bd19952a5e9c4a87

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page