🤖 Automatically generate high-quality Git commit messages powered by AI
-
🔍 Automatically analyze staged Git changes
-
📝 Generate semantic commit messages using DeepSeek AI
-
🎨 Support for multiple commit message formats (Conventional, Bracketed, etc.)
-
⚙️ Configurable AI model parameters
-
🚀 Simple and easy-to-use command line interface
-
💻 Rust and Cargo installed
-
🔑 DeepSeek API key
-
📦 Git
# Clone the repository
git clone https://github.com/Emin017/git-commit-generator.git
# Change to the project directory
cd git-commit-generator
# Build the binary
cargo build --release
# Install the binary
cargo install --path .
# Run the binary
git-commit-generator --help
nix run github:Emin017/git-commit-generator#git-commit-generator
Create a .env file in your project directory:
DEEPSEEK_API_KEY=your_api_key_here
# Add files to commit
git add .
# Generate commit message
git-commit-generator
# Use different commit format
git-commit-generator --format conventional
# Use different model
git-commit-generator --model deepseek-coder
Option | Short | Description | Default |
---|---|---|---|
--format | -f | Commit message format | conventional |
--model | -m | DeepSeek model | deepseek-chat |
Supported formats include:
-
Conventional:
feat: add new feature
-
Bracketed:
[feat]: add new feature
-
Plain:
add new feature
graph TD
A[Start] --> B[Read Configuration]
B --> C[Get Staged Changes]
C --> D{Any Changes?}
D -->|Yes| E[Call DeepSeek API]
D -->|No| F[Show Error]
E --> G[Generate Commit Message]
G --> H[End]
F --> H
This project is licensed under the Mulan PSL v2. You can find the full license text here.
Thanks to DeepSeek AI for providing powerful AI models and the Rust community for excellent development tools and libraries!
Contributions are welcome! Feel free to submit Issues and Pull Requests!