@ahmad_technology/gitcommit-ai
v1.0.2
Published
AI-powered git commit message generator following Conventional Commits
Downloads
386
Maintainers
Readme
🧠 gitcommit — AI Commit Message Generator
Generate meaningful, conventional git commit messages using AI — from your terminal.
✨ Features
- 🤖 Multi-provider AI — OpenAI, Anthropic, Google Gemini, Groq, NVIDIA NIM, OpenRouter, Ollama
- 📝 Conventional Commits — Automatically follows the spec (feat, fix, chore, docs, etc.)
- 🎨 Multiple styles — Conventional, detailed, emoji, or short
- ✏️ Interactive flow — Preview, edit, regenerate, or confirm before committing
- 🌍 Multi-language — Generate commit messages in any language
- ⚡ Works offline — Ollama support for fully local inference
- 🖥️ Cross-platform — Windows, macOS, and Linux
📦 Installation
# npm (recommended)
npm install -g @ahmad_technology/gitcommit-ai
# Or run directly
npx @ahmad_technology/gitcommit-ai🚀 Quick Start
# 1. Setup (first time only)
gitcommit setup
# 2. Stage your changes
git add .
# 3. Generate & commit
gitcommitWhat you'll see:
⠋ Analyzing 3 changed files...
✨ Suggested commit:
feat(auth): add OAuth2 login with Google provider
[ Confirm ] [ Edit ] [ Regenerate ] [ Cancel ]
> Confirm
✅ Committed: feat(auth): add OAuth2 login with Google provider🔧 Usage
gitcommit # Generate from staged diff
gitcommit --all # Include unstaged changes
gitcommit --provider anthropic # Override provider
gitcommit --model claude-opus-4 # Override model
gitcommit --style emoji # Emoji prefix style
gitcommit --lang fr # Output in French
gitcommit --dry-run # Print only, don't commit
gitcommit --copy # Copy to clipboard
gitcommit --regenerate # Get 3 options to choose from
gitcommit setup # Interactive config wizard
gitcommit config set provider groq
gitcommit config get defaults.model
gitcommit config list⚙️ Configuration
Config is stored in ~/.gitcommit/config.toml:
[defaults]
provider = "openai"
model = "gpt-4o"
style = "conventional"
language = "en"
max_diff_lines = 300
[openai]
api_key = "sk-..."
[anthropic]
api_key = "sk-ant-..."
[gemini]
api_key = "AIza..."
[groq]
api_key = "gsk_..."
[openrouter]
api_key = "sk-or-..."
[nim]
api_key = "nvapi-..."
base_url = "https://integrate.api.nvidia.com/v1"
[ollama]
base_url = "http://localhost:11434"
model = "llama3"🤖 Supported Providers
| Provider | Config Key | Notes |
|---|---|---|
| OpenAI | openai.api_key | GPT-4o, GPT-4-turbo |
| Anthropic | anthropic.api_key | Claude 3.5 Sonnet+ |
| Google Gemini | gemini.api_key | gemini-2.0-flash |
| Groq | groq.api_key | Llama 3.3, ultra-fast |
| NVIDIA NIM | nim.api_key | OpenAI-compatible |
| OpenRouter | openrouter.api_key | 100+ models |
| Ollama | None | Fully offline |
🛠️ Development
# Clone & install
git clone https://github.com/AhmadTchnology/Ai_Commit_Message_Generator.git
cd Ai_Commit_Message_Generator
npm install
# Run in dev mode
npm run dev
# Run tests
npm test
# Build
npm run build📄 License
MIT © AhmadTchnology
