<div align="center" <div <img src=".github/screenshot.png" alt="AI Commits"/ <img src="./aic.png" width="50" alt="AI Commits"/ <h1 align="center"AI Commits</h1 </div <pA CLI that writes your git commit messages for you with AI. Never write a commit message again.</p <a href="https://www.npmjs.com/package/aicommits"<img src="https://img.shields.io/npm/v/aicommits" alt="Current version"</a <a href="https://www.npmjs.com/package/aicommits"<img src="https://img.shields.io/npm/dt/aicommits" alt="Downloads"</a </div
---
Setup
The minimum supported version of Node.js is v22. Check your Node.js version with node --version.
- Install aicommits:
npm install -g aicommits- Run the setup command to choose your AI provider:
aicommits setupThis will guide you through:
- Selecting your AI provider (sets the provider config)
- Configuring your API key
- Automatically fetching and selecting from available models (when supported)
- Choosing your preferred commit message format (plain, conventional,
conventional+body, gitmoji, or subject+body)
Supported providers include:
- TogetherAI (recommended) - Get your API key from TogetherAI
- OpenAI - Get your API key from OpenAI API Keys page
- Groq - Get your API key from Groq Console
- xAI - Get your API key from xAI Console
- OpenRouter - Get your API key from OpenRouter
- Ollama (local) - Run AI models locally with Ollama
- LM Studio (local) - No API key required. Runs on your computer via LM Studio
- Custom OpenAI-compatible endpoint - Use any service that implements the OpenAI API
Together AI, OpenAI, xAI, and LM Studio models use the agentic generation flow. Tested Together models without compatible tool calls use the one-shot path; OpenAI, xAI, and LM Studio fall back when an endpoint rejects tools. LM Studio also falls back when a local model does not submit the required tool call. Other providers continue through the one-shot flow.
For CI/CD environments, you can also set up configuration via the config file:
aicommits config set OPENAI_API_KEY="your_api_key_here"
aicommits config set OPENAI_BASE_URL="your_api_endpoint" # Optional, for custom endpoints
aicommits config set OPENAI_MODEL="your_model_choice" # Optional, defaults to provider defaultNote: When using environment variables, ensure all related variables (e.g., OPENAIAPIKEY and OPENAIBASEURL) are set consistently to avoid configuration mismatches with the config file.