A CLI tool that generates AI-based commit messages from staged changes.
npm install @syedharis14/git-ai-commit!npm
AI-powered Git commit message generator using OpenAI.
- 🚀 Generates AI-powered commit messages based on staged changes
- 📋 Optionally copies commit messages to clipboard
- 🔄 Auto-commit support
- 🌍 Supports multiple languages (--lang option)
- 📊 Usage statistics tracking
- 🔄 Update notifications
``sh`
npm install -g @syedharis14/git-ai-commit
`sh`
git-ai-commit generate
`sh`
git-ai-commit generate --auto-commit
`sh`
git-ai-commit generate --copy
`sh`
git-ai-commit generate --lang fr
`sh`
git-ai-commit stats
Create a .git-ai-commitrc in your project root:
`json`
{
"model": "gpt-4o",
"maxLines": 100,
"autoCommit": false,
"copy": false,
"lang": "en",
"analytics": true
}
Set OPENAI_API_KEY in your .env file:
`sh``
OPENAI_API_KEY=your_api_key_here
This package uses GitHub Actions for automatic releases and NPM publishing:
- Runs tests and builds TypeScript
- Pushes tags and releases to GitHub
- Publishes to NPM and GitHub Packages
- 📦 NPM Package
- 📂 GitHub Repository
- 🐛 Report Issues