AI-assisted commit message generator and auto-committer
npm install @neelfrostrain/commit-aifixed bug, update index.ts, or the dreaded ...........
package-lock.json or node_modules to focus on your actual contributions.
bash
npm i @neelfrostrain/commit-ai -g
`
$3
1. Visit Groq Cloud Console.
2. Create a new API Key and copy it.
$3
To use Commit-AI, you must set your GROQ_API_KEY as an environment variable. Choose your preferred terminal below:
#### Option A: Command Prompt (CMD)
Run this command (replace your_key_here with your actual key):
`cmd
setx GROQ_API_KEY "your_key_here"
`
#### Option B: PowerShell
Run this command:
`powershell
[System.Environment]::SetEnvironmentVariable('GROQ_API_KEY', 'your_key_here', 'User')
`
> ⚠️ Important: You must restart your terminal (CMD, PowerShell, or VS Code) after running these commands for the changes to take effect.
---
✨ Features
| Feature | Description |
| ------------------------- | ---------------------------------------------------------------- |
| 🧠 Deep Diff Analysis | Understands code logic, not just file metadata. |
| 📝 Conventional Style | Strictly follows the type: description standard. |
| 📊 Technical Reports | Generates a detailed bulleted summary for the commit body. |
| 🛡️ Smart Filtering | Respects .gitignore and ignores heavy lockfiles automatically. |
| 🚀 Sub-second Speed | Powered by Groq for nearly instant commit generation. |
---
📖 Usage
$3
| Flag | Short | Description |
| ----------- | ----- | ------------------------------------------------------- |
| --commit | -c | Performs the git commit after generating the message. |
| --yes | -y | Skips the confirmation prompt (Auto-pilot). |
| --version | -v | Displays the current version. |
| --help | -h | Displays the help menu. |
$3
1. Stage your changes:
`bash
git add .
`
2. Run Commit-AI:
`bash
commit-ai -c
`
3. Review & Confirm: The AI will show you a report and the suggested message. Type y to finalize!
---
⚙️ Standards & Security
$3
Commit-AI automatically categorizes your work into:
- feat: New features
- fix: Bug fixes
- docs: Documentation updates
- style: Formatting/Linting
- refactor: Code restructuring
- chore: Build tasks/dependencies
$3
- Local Keys: Your API key stays on your machine and is never shared.
- Diffs Only: Only the git diff` of your staged files is sent to the AI for processing. No other system data is accessed.