3 unstable releases
0.2.1 | Jan 31, 2025 |
---|---|
0.2.0 | Jan 31, 2025 |
0.1.0 | Jan 31, 2025 |
#1954 in Development tools
388 downloads per month
17KB
181 lines
🚀 Commitgenius
A powerful CLI tool that generates conventional commit messages using local LLMs via Ollama. Say goodbye to writing commit messages manually!
✨ Features
- 🤖 Generates smart, conventional commit messages using local LLMs
- 🔄 Automatically manages Ollama service
- 🎯 Supports multiple Ollama models
- 🚀 Fast and efficient
- 💻 Works offline with local models
- 📝 Automatic git staging with smart file selection
📦 Installation
Using Cargo (Recommended)
cargo install commitgenius
Building from Source
- Clone the repository:
git clone https://github.com/bannawandoor27/Commitgenius.git
cd Commitgenius
- Build and install:
cargo install --path .
Prerequisites
- Ollama must be installed on your system
- Rust and Cargo (if building from source)
🚀 Usage
Basic Usage
- Stage and commit all changes:
cmgenius .
- Stage and commit specific files:
cmgenius file1.rs file2.rs
- Commit already staged changes:
cmgenius
Advanced Usage
Use a different model:
# Stage and commit all changes with a specific model
cmgenius . --model codellama
# Stage and commit specific files with a specific model
cmgenius file1.rs file2.rs --model codellama
# Commit staged changes with a specific model
cmgenius --model codellama
Available models:
- qwen2.5:7b (default)
- codellama
- llama2
- mistral
- neural-chat
- And any other model available in Ollama
Examples
# Stage and commit all changes
cmgenius .
# Stage and commit specific files
cmgenius src/main.rs Cargo.toml
# Commit already staged changes with a specific model
cmgenius --model codellama
# View available options
cmgenius --help
🤝 Contributing
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes using Commitgenius! (
cmgenius .
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Ollama for providing the local LLM infrastructure
- The Rust community for amazing crates and tools
📧 Contact
Muhammed Banna - @bannawandoor27
Project Link: https://github.com/bannawandoor27/Commitgenius
Dependencies
~15–28MB
~473K SLoC