← All tools

aicommits

Popularity 85 Updated Development & Build

Writes your git commit messages for you with AI

homebrewauto-collected

Installation

Homebrew
brew install aicommits

Install with Homebrew.

<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 setup

This 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

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 default

Note: When using environment variables, ensure all related variables (e.g., OPENAIAPIKEY and OPENAIBASEURL) are set consistently to avoid configuration mismatches with the config file.

This will create a .aicommits file in your home directory.

Upgrading