https://github.com/graniet/comgen
Automatically generate meaningful commit messages harnessing the power of Large Language Models (LLMs) 🤖✨
https://github.com/graniet/comgen
commit git llm rust
Last synced: 2 months ago
JSON representation
Automatically generate meaningful commit messages harnessing the power of Large Language Models (LLMs) 🤖✨
- Host: GitHub
- URL: https://github.com/graniet/comgen
- Owner: graniet
- License: mit
- Created: 2024-12-04T05:11:55.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-04T05:57:03.000Z (over 1 year ago)
- Last Synced: 2025-03-29T09:13:18.548Z (over 1 year ago)
- Topics: commit, git, llm, rust
- Language: Rust
- Homepage:
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

ComGen is a command-line tool that automatically generates Git commit messages using Large Language Models (LLMs). It analyzes modified files in your Git repository and creates relevant commit messages based on code differences.
[](https://www.rust-lang.org/)
[](https://opensource.org/licenses/MIT)
[](https://asciinema.org/a/jx1V2DqcGIhgXATjQzGVUFANy)
## Features ✨
- 🔍 Analyzes modified files in your Git repository
- 🤖 Uses LLMs to generate intelligent commit messages
- 🔧 Supports multiple LLM providers (OpenAI, Anthropic, Ollama)
- 🛡️ Performs security audits on code changes
- 📝 Allows customization of commit message templates
- 🌐 Works on Windows, macOS and Linux
## Configuration 🛠️
ComGen uses two main configuration files:
### Main Configuration (`config.yaml`)
The main configuration allows you to define:
- `provider`: The LLM provider ("openai", "anthropic", "ollama")
- `model`: The model to use (e.g., "gpt-4")
- `base_prompt`: The base prompt for generation
- `templates`: Commit template configuration
- API keys for different providers
### Commit Template (`comgen.template`)
The `comgen.template` file defines the structure of commit messages, it can be used at the root of a project to define a particular standard.
- `commit_types`: List of allowed commit types (feat, fix, docs, etc.)
- `output_format`: Output format configuration
- `template`: Message structure "[optional scope]: "
- `max_length`: Maximum message length (100 characters)
- `examples`: Examples of valid commit messages