labs
한국어 hello@taklabs.dev

Work / aicommit2

aicommit2

A CLI that asks several AI models for a commit message at once and lets you pick. It works with Git, YADM and Jujutsu, and with Ollama, Claude, Gemini, OpenAI and any OpenAI-compatible API.

GitHub
★ 530
Works with
Git · YADM · Jujutsu
Providers
17 built in · OpenAI-compatible
Install
Homebrew · npm

What it does.

How it is designed.

The request fan-out, the diff compressor and the project config of aicommit2, drawn from its code.

One diff, every provider at onceThe staged diff is cut if it is over 100 KB and sent as one request per model to Ollama, Claude, Gemini and 14 more built-in providers; the repo config adds no keys; the picker’s choice is saved for --retry and committed.MODELS, IN PARALLELStaged diffCutif over 100 KBOne request per modelOllamaClaudeGemini14 more built inPickerSavedfor --retryCommitRepo configno keys
Fig. 01 One diff, every provider at once
  1. One request per provider and model

    Each provider fires one request for every model it is configured with, and every request is its own stream. Messages reach the picker as they arrive, so a slow provider does not hold the others. One function gives the number of requests to both the progress counter and the requests themselves, so the two cannot drift apart.

  2. Providers load on first use

    The registry holds the 17 built-in providers as loaders. A provider’s SDK is imported the first time that provider is used, so a run that asks two of them does not load the other fifteen. An OpenAI-compatible endpoint you configure takes its own path beside the registry.

  3. A big diff is cut before it is sent

    In the default mode a diff under 100 KB is sent untouched. A larger one loses its metadata headers and its distant context lines, each hunk is capped at 150 lines and the whole diff at 3,000, so a big staged change does not fail at the provider.

  4. A repository shapes the message, not the keys

    A repository can carry its own .aicommit2/config.ini. Because that file comes from whoever wrote the repository, only content and shape settings are read from it: the locale, the commit type, the prompt, one model per provider. API keys and endpoint URLs are ignored with a warning, the file cannot turn a disabled provider back on, and a prompt path must stay inside .aicommit2/.

  5. A failed commit keeps its message

    With Git and YADM the message you picked is saved before the commit runs its hooks. If a pre-commit hook rejects the commit, aicommit2 --retry commits the same message later with no provider call. The saved message is removed once a commit succeeds.

hello@taklabs.dev