A TypeScript CLI that guides you through writing Conventional Commits messages, with branch-based inference and branch/worktree helpers.
Nutlope/aicommits
A CLI that generates git commit messages from your staged changes using an AI model of your choice.
- Stars
- 9,125
- Forks
- 483
- Open issues
- 9
- Last commit
- 11 days ago
What is it?
AI Commits is a command-line tool that reads your staged git changes and drafts a commit message for them, so you do not have to write one by hand. It supports several AI providers, including TogetherAI, OpenAI, Groq, xAI, OpenRouter, Ollama, LM Studio, and any OpenAI-compatible endpoint, and you choose the provider and model through an interactive setup command.
Beyond the default plain style, it can produce Conventional Commits, Conventional Commits with a body, gitmoji-style messages, or a subject with a body. You can also generate several candidates to pick from, add a description, exclude files from analysis, or steer the output with a custom prompt such as a required language or tone.
It can run directly as a command that passes unknown flags through to git commit, or install as a prepare-commit-msg Git hook so the generated message opens in your editor for review before committing. Configuration can come from a config file or environment variables, which suits CI/CD use.
Key features
- 01Supports TogetherAI, OpenAI, Groq, xAI, OpenRouter, Ollama, LM Studio, and custom OpenAI-compatible endpoints.
- 02Offers plain, conventional, conventional+body, gitmoji, and subject+body commit formats.
- 03Can generate multiple candidate messages to choose from.
- 04Installs as a prepare-commit-msg Git hook for editing before commit.
- 05Lets you add a custom prompt to control language or style.
- 06Includes an update command that detects npm, pnpm, yarn, or bun.
Use cases
- Writing commit messages quickly for day-to-day work on a git repository.
- Enforcing Conventional Commits or gitmoji formats across a team without manual effort.
- Generating commit messages in a CI/CD pipeline using environment variables.
- Running a local model with Ollama or LM Studio to keep diffs on your machine.
Quick start
- 1
Check that Node.js is version 22 or newer
node --version - 2
Install aicommits globally with npm
npm install -g aicommits - 3
Run the setup command to choose your AI provider and API key
aicommits setup - 4
Stage your changes and generate a commit message
aicommits
Things to know
- Requires Node.js 22 or newer.
- Most providers need an API key, while local options need a model running on your machine.
In collections
Topics
FAQ
- What is aicommits?
- A CLI that generates git commit messages from your staged changes using an AI model of your choice. AI Commits is a command-line tool that reads your staged git changes and drafts a commit message for them, so you do not have to write one by hand. It supports several AI providers, including TogetherAI, OpenAI, Groq, xAI, OpenRouter, Ollama, LM Studio, and any OpenAI-compatible endpoint, and you choose the provider and model through an interactive setup command.
- Is aicommits free to use? What license does it have?
- aicommits is open source under the MIT license. Check the license terms before using it in commercial products.
- Is aicommits still maintained?
- Actively maintained. The last commit to aicommits was on Oct 27, 2026.
- What can I use aicommits for?
- Writing commit messages quickly for day-to-day work on a git repository. Enforcing Conventional Commits or gitmoji formats across a team without manual effort. Generating commit messages in a CI/CD pipeline using environment variables. Running a local model with Ollama or LM Studio to keep diffs on your machine.
- How do I install aicommits?
- Check that Node.js is version 22 or newer: node --version Install aicommits globally with npm: npm install -g aicommits Run the setup command to choose your AI provider and API key: aicommits setup Stage your changes and generate a commit message: aicommits
- Where can I get aicommits?
- The source code and installation instructions are on GitHub: https://github.com/Nutlope/aicommits
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A CLI tool that generates conventional git commit messages from your staged diff using AI models, then commits them.
A git commit hook that runs an AI code review on every staged diff before the commit lands, with a browser UI for inline comments.
A git prepare-commit-msg hook that uses OpenAI models to draft commit messages from your staged changes.
A Go CLI that generates git commit messages and brief code reviews with LLMs, and can install a prepare-commit-msg git hook.
A CLI that generates Git and Jujutsu commit messages with AI providers such as Ollama, OpenAI, Claude, Gemini and Mistral.