CLI tool for LLM-powered commit messages
Top 7.6% on sourcepulse
OpenCommit is a CLI tool that leverages Large Language Models (LLMs) to automatically generate Git commit messages. It aims to replace generic commit messages with descriptive, AI-generated ones, improving code commit quality and developer workflow. The tool is suitable for individual developers and teams seeking to standardize and enhance their commit message practices.
How It Works
OpenCommit analyzes staged Git changes and uses an LLM to generate a commit message. It supports various LLM providers, including OpenAI (GPT models), Anthropic (Claude), and local models via Ollama. Users can configure the AI provider, model, token limits, language, and commit message format (e.g., conventional commits or @commitlint). The tool can also integrate GitMoji for stylized commits and offers a Git hook for seamless integration into the commit process.
Quick Start & Requirements
npm install -g opencommit
oco config set OCO_API_KEY=<your_api_key>
git add <files...>
then oco
Highlighted Details
conventional-commit
, @commitlint
).prepare-commit-msg
Git hook.Maintenance & Community
The project is actively maintained by its author, di-sukharev. Community interaction and contributions are encouraged via GitHub issues and discussions.
Licensing & Compatibility
The repository does not explicitly state a license in the provided README. Users should verify licensing for commercial use or integration with closed-source projects.
Limitations & Caveats
OpenCommit relies on external LLM APIs, incurring costs for usage beyond local models. The quality of generated messages depends on the chosen LLM and prompt configuration. The GitHub Action is in Beta.
1 day ago
Inactive