Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (openrouter-commit) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
openrouter-commit π AI-Powered Git Commit Messages
Generate smart, AI-driven Git commit messages using OpenRouter models like DeepSeek R1. Automate your commit workflow and write meaningful commits effortlessly.
β‘ Quick Start
Run without installation
npx openrouter-commit -runInstall globally
npm install -g openrouter-commit
openrouter-commit -runUse in a project (package.json)
{
"scripts": {
"commit": "npx openrouter-commit -run"
}
}Run it with:
npm run commit # or yarn commitπ Updating
- 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
βοΈ Setup
API Key & Model
Option 1: .env.openrouter file (recommended)
OPENROUTER_API_KEY=your-api-key
OPENROUTER_MODEL=deepseek/deepseek-r1Option 2: Environment variables
export OPENROUTER_API_KEY=your-api-key
export OPENROUTER_MODEL=deepseek/deepseek-r1Option 3: Custom .env path
npx openrouter-commit -run --env-path /custom/path/.envπ How It Works
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
π Ignored Files
By default, openrouter-commit ignores common files that shouldn't be in commits:
.env.openrouternode_modules/,.npm/,package-lock.jsondist/,venv/,env/,__pycache__/,*.pyc,*.pyo,Pipfile.lock,poetry.locklogs/,*.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.
π₯ Features
β
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
β Troubleshooting
Not enough OpenRouter credits?
π Top up here
Command not found?
npx openrouter-commit -runOr:
npm install -g openrouter-commit
openrouter-commit -runGit push fails?
Ensure your branch is tracking a remote branch:
git branch --set-upstream-to=origin/mainπ‘ About
Built by Unrealos.com β AI, SaaS, and PaaS solutions.
π License
MIT Β© Unrealos.com π