Generate smart, AI-driven Git commit messages using OpenRouter models like DeepSeek R1. Automate your commit workflow and write meaningful commits effortlessly.
npx openrouter-commit -run
npm install -g openrouter-commit
openrouter-commit -run
{
"scripts": {
"commit": "npx openrouter-commit -run"
}
}
Run it with:
npm run commit # or yarn commit
- Global (del):
sudo npm uninstall -g openrouter-commit
- Global:
sudo npm update -g openrouter-commit
- npx users:
npx clear-npx-cache
- Project-based:
npm update openrouter-commit
OPENROUTER_API_KEY=your-api-key
OPENROUTER_MODEL=deepseek/deepseek-r1
export OPENROUTER_API_KEY=your-api-key
export OPENROUTER_MODEL=deepseek/deepseek-r1
npx openrouter-commit -run --env-path /custom/path/.env
1️⃣ Checks Git status
2️⃣ Prompts to stage changes
3️⃣ Generates an AI-powered commit message
4️⃣ Lets you confirm or edit it
5️⃣ Commits and pushes automatically
By default, openrouter-commit
ignores common files that shouldn't be in commits:
.env.openrouter
node_modules/
,.npm/
,package-lock.json
dist/
,venv/
,env/
,__pycache__/
,*.pyc
,*.pyo
,Pipfile.lock
,poetry.lock
logs/
,*.log
,debug.log*
,*.swp
,*.swo
.cache/
,.idea/
,.editorconfig
.DS_Store
,Thumbs.db
If needed, modify the IGNORED_FILES
list in openrouter-commit
's source code.
✅ AI-powered commit messages
✅ Interactive CLI with confirmation prompts
✅ Custom .env
paths with --env-path
✅ Handles large diffs intelligently
✅ Failsafe exit handling (Ctrl+C won’t commit unfinished work)
✅ Prevents accidental execution with -run
flag
✅ Ignores unnecessary files from commits
npx openrouter-commit -run
Or:
npm install -g openrouter-commit
openrouter-commit -run
Ensure your branch is tracking a remote branch:
git branch --set-upstream-to=origin/main
Built by Unrealos.com – AI, SaaS, and PaaS solutions.
MIT © Unrealos.com 🚀