← Back to Discover

AICommits

Open-source command-line tool that reads your staged git changes and writes a commit message through the AI provider you choose, including local models, in several message formats.

Command-line tools

What it does

AI Commits (aicommits) is an open-source CLI, installed with npm, that writes git commit messages. The model receives the list of staged files and requests the staged diffs it needs, then returns a validated commit subject with an optional description. Unstaged edits are never sent. A setup step lets you pick a provider: TogetherAI, OpenAI, Groq, xAI, OpenRouter, Ollama, LM Studio, or any OpenAI-compatible endpoint. Messages can be plain, Conventional Commits, Conventional Commits with a body, gitmoji, or subject plus body, and a custom prompt can steer language or style. You can call it directly after staging files, or install it as a prepare-commit-msg Git hook so a normal git commit opens an editable generated message. It requires Node.js 22 or newer.

Capabilities

  • Generates commit messages from staged changes only
  • Works with hosted providers, Ollama, LM Studio and custom OpenAI-compatible endpoints
  • Five message formats, including Conventional Commits and gitmoji
  • Optional prepare-commit-msg Git hook
  • Custom prompts and several suggestions per commit

When to use it

  • Drafting commit messages that follow the Conventional Commits format
  • Generating commit messages with a local model instead of a hosted API
  • Adding generated commit messages to an existing git workflow through a hook