Favicon of OpenCommit

OpenCommit

An AI commit message generator turns Git changes into messages using local models through Ollama or llama.cpp, or cloud providers such as OpenAI.

OpenCommit is a command-line tool for developers who want AI to write commit messages from their Git changes. It can create the commit after you review the proposed message and also fits into an IDE's existing Git workflow.

  • Local model support: Generate messages with Ollama models such as Mistral and Llama, or use GGUF models served by llama.cpp on your machine or another server you control.
  • Commit conventions: Use Conventional Commits or your project's @commitlint rules, with optional GitMoji, longer descriptions, and messages in different languages.
  • Git and IDE integration: Generate messages from staged changes in the terminal or through a Git hook that lets you edit the message before committing in your IDE.
  • Message context and file exclusions: Add issue or pull request references through templates, and exclude files from model requests with repository-specific or global ignore rules.

OpenCommit is open source under the MIT license. The CLI runs locally, while the selected model backend determines where your changes go for generation. Ollama and llama.cpp can keep that processing on your own hardware; cloud providers such as OpenAI, Anthropic, and Gemini receive the changes included in requests and require an API key. Cloud API usage is paid separately.

Similar to OpenCommit