Skip to content

raghavpillai/gen-commit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gen Commit

Gen Commit uses LLMs to 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 and description 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

npm install -g @raghavp/gen-commit

Initialization

Once you have it installed, initialize gencommit

gencommit --init

Go to ~/.gen-commit and add your OpenAI, Anthropic, or Google API key.

Configuration

MODEL=<provider:model (i.e. openai:gpt-5-mini, anthropic:claude-haiku-4-5, or google:gemini-2.5-flash-lite)>
OPENAI_API_KEY=<your openai api key>
ANTHROPIC_API_KEY=<your anthropic api key>
GOOGLE_API_KEY=<your google api key>

OPTIONAL:

MAX_TOKENS_ALLOWED=<number>

About

Automatically generate git commit messages

Resources

License

Stars

Watchers

Forks