@raghavp/gen-commit
v2.0.2
Published
Auto-generate git commit messages using AI
Downloads
267
Readme
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.
Usage
gencommit works exactly like git commit, but it generates the commit message and description for you.
gencommitis 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 -ais 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-commitInitialization
Once you have it installed, initialize gencommit
gencommit --initGo 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>