CLI tool for AI-powered git commit message generation
Top 85.3% on sourcepulse
This CLI tool automates the generation of Git commit messages using a variety of AI models, including OpenAI, Gemini, Claude, and Ollama. It's designed for developers who want to streamline their commit workflow by leveraging AI to create descriptive and consistent commit messages, supporting both cloud-based and local AI services.
How It Works
The tool analyzes staged code changes using git diff
and sends this information to configured AI providers. It supports simultaneous requests to multiple AI services, allowing users to select the best generated message. The architecture is inspired by AICommits, offering flexibility in AI model selection and configuration.
Quick Start & Requirements
npm install -g aicommit2
aicommit2 config set OPENAI.key=
).git add .
then aicommit2
Highlighted Details
prepare-commit-msg
Git hook.Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The codeReview
and watch-commit
features are experimental and may significantly increase token consumption and processing time. If git diff
output is too large, AI generation may fail, requiring users to reduce the "commit unit."
2 days ago
1 day