@ariian/lazy-commit
v1.3.2
Published
AI-powered git commit message generator
Downloads
874
Readme
🦥 lazy-commit
Stop writing commit messages. Let AI do it for you.
Generate clean, conventional git commit messages from your staged diff — instantly, in one command.
why lazy-commit?
Writing commit messages is boring. So this tool automates it properly.
- AI-generated commit messages from your real diff
- conventional commits format by default
- one-command workflow
- multi-provider support (openai, anthropic, groq)
--dry-runflag to preview without committing- regenerate or edit the suggested message before committing
--versionflag to check the installed version- custom instructions support
- always asks before committing — safe by design
install
npm install -g @ariian/lazy-commitsetup
Run the config wizard once:
lazy-commit configYou'll be prompted for:
| field | description |
|---|---|
| provider | ai provider — openai, anthropic, or groq |
| apiKey | your api key for the chosen provider |
| instructions | custom commit rules (optional) |
| prefix | optional tag added to every commit |
Config is stored at ~/.config/lazy-commit/config.json.
usage
Stage your changes and run:
git add .
lazy-commitThen choose:
y→ accept and commitn→ cancelr→ regenerate a new message from the AIe→ edit the message inline before committing
dry run
Preview the suggested message without committing:
lazy-commit --dry-runversion
Check the installed version:
lazy-commit --versionexample
$ git add src/auth.ts
$ lazy-commit
generating commit message using openai...
suggested commit message:
fix(auth): handle token expiry edge case in refresh flow
use this message? (y)es / (n)o / (r)egenerate / (e)dit: e
current message: fix(auth): handle token expiry edge case in refresh flow
edit: fix(auth): handle token expiry and add retry logic
updated message: fix(auth): handle token expiry and add retry logic
[main 3f2a1c4] fix(auth): handle token expiry and add retry logic
1 file changed, 12 insertions(+), 3 deletions(-)
committed!config file
Your config lives at ~/.config/lazy-commit/config.json:
{
"provider": "openai",
"apiKey": "sk-...",
"instructions": "always use conventional commits: feat, fix, chore, docs, refactor. keep messages short and clear.",
"prefix": "arii"
}To update any setting, run lazy-commit config again.
supported providers
| provider | model used | free tier |
|---|---|---|
| openai | gpt-4o-mini | no |
| anthropic | claude-haiku | no |
| groq | llama3-8b-8192 | yes |
requirements
- node 18+
- a git repository with staged changes
- an api key for your chosen provider
development
git clone https://github.com/ary-na/lazy-commit
cd lazy-commit
npm installtest locally against a real repo:
cd /path/to/your/repo
git add .
npx tsx /path/to/lazy-commit/src/index.tsbuild:
npm run buildlicense
mit © arii.dev
