CLI tool for generating commit messages using AI
Top 69.0% on sourcepulse
AI-Commit is a command-line tool that leverages AI to generate commit messages for Git repositories, targeting developers seeking to streamline their commit workflow. It integrates with OpenAI's GPT models and optionally Ollama for local inference, aiming to produce informative and conventional commit messages, potentially enhanced with Gitmojis.
How It Works
AI-Commit analyzes staged code changes using Git diffs. It then sends this diff information to a specified AI model (OpenAI's GPT-4o-mini by default, or a local Ollama model) to generate a commit message. The user can then approve the generated message or select from multiple suggestions before the commit is finalized. This approach automates the often tedious task of writing descriptive commit messages, promoting consistency and clarity in project history.
Quick Start & Requirements
npm install -g ai-commit
OPENAI_API_KEY
environment variable.ollama run mistral
) required for local inference; set PROVIDER=ollama
environment variable.Highlighted Details
--list
), automatic commits (--force
), fee display (--filter-fee
), custom templates, and language selection.Maintenance & Community
The project is maintained by insulineru. Community contributions are welcomed via pull requests.
Licensing & Compatibility
Limitations & Caveats
The roadmap indicates features like automated scope detection, improved emoji suggestions, and Git hook integration are still under development. Advanced diff analysis and reverse commit message generation are also planned future enhancements.
6 months ago
1 week