Repolode
tak-bro

tak-bro/aicommit2

A CLI that generates Git and Jujutsu commit messages with AI providers such as Ollama, OpenAI, Claude, Gemini and Mistral.

Stars
532
Forks
47
Open issues
0
Last commit
11 days ago

What is it?

aicommit2 reads your staged changes, sends the diff to one or more configured AI providers, and returns commit message candidates to pick from before committing. It works with Git, YADM and Jujutsu repositories, detecting the VCS automatically, and supports many providers including OpenAI, Anthropic, Gemini, Mistral, Groq, Ollama and any OpenAI-compatible API.

The tool can query several providers at once and show their results in an interactive picker. It also offers conventional and gitmoji formats, a custom prompt template, diff compression to reduce token usage, and an optional AI code review step before committing.

It can run as a prepare-commit-msg Git hook, through the pre-commit framework, or inside LazyGit, and includes commands for a setup wizard, a provider health check, usage statistics and rewriting existing commit messages.

Key features

  • 01Generates commit messages for Git, YADM and Jujutsu repositories.
  • 02Queries multiple AI providers at once and lets you pick the best message.
  • 03Supports conventional and gitmoji commit formats with custom prompts.
  • 04Compresses diffs to reduce token usage on large changes.
  • 05Integrates with Git hooks, the pre-commit framework and LazyGit.

Use cases

  • Writing consistent conventional commit messages across a team repository.
  • Running a local Ollama model so diffs never leave your machine.
  • Generating commit messages inside LazyGit without leaving the UI.
  • Rewriting vague or old commit messages with AI assistance.

Quick start

  1. 1

    Install via Homebrew (macOS/Linux)

    brew install aicommit2
  2. 2

    Or install via npm

    npm install -g aicommit2
  3. 3

    Set up AI providers with the interactive wizard

    aicommit2 setup
  4. 4

    Stage files and run in your Git repository

    git add <files...> && aicommit2

Things to know

  • Needs at least one AI provider configured, which often means an API key or a paid account.
  • Copilot SDK support is not included in the Homebrew install and requires npm.
  • Watch commit mode is not supported for YADM repositories.
  • Very large diffs can make AI generation fail, so commits may need to be split.

In collections

Topics

#git-commit#cli#ai#llm#commit-message#developer-tools#git-hooks#ai-commits#aicommit#aicommits

FAQ

What is aicommit2?
A CLI that generates Git and Jujutsu commit messages with AI providers such as Ollama, OpenAI, Claude, Gemini and Mistral. aicommit2 reads your staged changes, sends the diff to one or more configured AI providers, and returns commit message candidates to pick from before committing. It works with Git, YADM and Jujutsu repositories, detecting the VCS automatically, and supports many providers including OpenAI, Anthropic, Gemini, Mistral, Groq, Ollama and any OpenAI-compatible API.
Is aicommit2 free to use? What license does it have?
aicommit2 is open source under the MIT license. Check the license terms before using it in commercial products.
Is aicommit2 still maintained?
Actively maintained. The last commit to aicommit2 was on Oct 28, 2026.
What can I use aicommit2 for?
Writing consistent conventional commit messages across a team repository. Running a local Ollama model so diffs never leave your machine. Generating commit messages inside LazyGit without leaving the UI. Rewriting vague or old commit messages with AI assistance.
How do I install aicommit2?
Install via Homebrew (macOS/Linux): brew install aicommit2 Or install via npm: npm install -g aicommit2 Set up AI providers with the interactive wizard: aicommit2 setup Stage files and run in your Git repository: git add <files...> && aicommit2
Where can I get aicommit2?
The source code and installation instructions are on GitHub: https://github.com/tak-bro/aicommit2

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects