ai-git-commit-generator
v1.0.0
Published
An AI-powered CLI tool that generates conventional commit messages based on your staged changes using OpenRouter.
Downloads
119
Maintainers
Readme
AI Commit Generator 🚀
An AI-powered CLI tool that generates conventional commit messages based on your staged changes using OpenRouter.
Stop struggling to remember what you changed. Let AI write your commit messages for you!
✨ Features
- 🧠 AI-Powered: Uses advanced LLMs via OpenRouter to analyze your
git diff. - 📝 Conventional Commits: Generates messages in the
type(scope): descriptionformat. - 🚀 One-Command Commit: Use the
--commitflag to generate and commit in one go. - 🛠️ Developer Friendly: Written in modern ESM Node.js.
🚀 Installation
You can install it globally using your favorite package manager:
Using npm
npm install -g ai-git-commit-generatorUsing pnpm
pnpm add -g ai-git-commit-generatorUsing yarn
yarn global add ai-git-commit-generator⚙️ Configuration
- Get an API key from OpenRouter.
- You can either:
- Create a
.envfile in your project root with:OPENROUTER_API_KEY=your_key_here - Or set it as a global environment variable in your system.
- Create a
📖 Usage
1. Stage your changes
git add .2. Generate a message
ai-commit3. Generate and Commit automatically
ai-commit --commit📄 License
MIT © sahil-Housiey
