OpenCommit reads your staged git changes, sends the diff to an LLM, and returns a well-formatted commit message that describes what changed and why. It follows conventional commit format by default (feat:, fix:, refactor:, etc.) and can be customized to match your team's commit conventions. The entire process takes about one second, eliminating the context-switching cost of writing descriptive commit messages manually.
The tool supports multiple LLM providers: OpenAI GPT models, Anthropic Claude, Google Gemini, and local models via Ollama — so you can use it without sending code to external services. Configuration is stored in a simple config file with options for language, message style, max tokens, and custom prompts. Integration options include a standalone CLI (oco command), a prepare-commit-msg git hook for automatic generation, and a GitHub Action for CI workflows.
OpenCommit won the GitHub 2023 Hackathon and has 7,200+ GitHub stars with 100+ merged PRs. It is MIT licensed and actively maintained. Compared to aicommits (a similar tool), OpenCommit offers broader LLM provider support, conventional commit enforcement, and GitHub Action integration. Both tools share the philosophy that commit messages should describe intent, not just list changed files.