tak-bro/aicommit2
A Reactive CLI that generates commit messages for Git and Jujutsu with Ollama, ChatGPT, Gemini, Claude, Mistral and other AI
What it solves
aicommit2 is a command-line tool that eliminates the manual effort of writing Git commit messages. It analyzes your staged code changes (diffs) and uses AI to generate a concise, professional commit message that accurately describes the work performed.
How it works
The tool runs a git diff (or equivalent for other VCS) to capture the latest changes. This diff is then sent to a configured AI provider. To optimize costs and performance, it uses smart diff compression to reduce token usage by 30-60%.
It supports a wide range of AI providers, including OpenAI, Anthropic Claude, Google Gemini, Mistral, Cohere, Groq, and local models via Ollama. It also supports any service that implements the OpenAI API specification.
Who it’s for
Developers who use Git, YADM (Yet Another Dotfiles Manager), or Jujutsu (jj) and want to automate their commit message generation while maintaining high-quality, standardized commit history.
Highlights
- Multi-VCS Support: Works seamlessly with Git, YADM, and Jujutsu repositories with automatic detection.
- Reactive CLI: Allows simultaneous requests to multiple AI providers, letting the user select the best message from a streaming list.
- AI Code Review: Provides a structured code review with severity levels before the commit is finalized.
- Integration: Integrates directly with LazyGit and can be used as a
prepare-commit-msgGit hook. - Customization: Supports custom system prompt templates and multiple message formats like Conventional Commits and Gitmoji.
- Commit Rewriting: Ability to rewrite existing commit messages using AI via the
rewritecommand.
Related
- Project
- Project
- Project
- Project
- Project