Skip to content

Emin017/git-commit-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🚀 Git Commit Generator

DeepSeek AI GitHub Rust AI

GitHub GitHub workflows GitHub issues GitHub pull requests GitHub release (latest by date)

GitHub stars GitHub forks

English 中文

🤖 Automatically generate high-quality Git commit messages powered by AI

✨ Features

  • 🔍 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

📋 Prerequisites

  • 💻 Rust and Cargo installed

  • 🔑 DeepSeek API key

  • 📦 Git

🛠️ Installation

From source

# 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

Using Nix

nix run github:Emin017/git-commit-generator#git-commit-generator

⚙️ Configure DeepSeek API Key

Create a .env file in your project directory:

DEEPSEEK_API_KEY=your_api_key_here

🚀 Usage

# 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

💡 Available Options

Option Short Description Default
--format -f Commit message format conventional
--model -m DeepSeek model deepseek-chat

📝 Commit Message Formats

Supported formats include:

  • Conventional: feat: add new feature

  • Bracketed: [feat]: add new feature

  • Plain: add new feature

🔄 Workflow

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
Loading

🛡️ License

This project is licensed under the Mulan PSL v2. You can find the full license text here.

🙏 Acknowledgments

Thanks to DeepSeek AI for providing powerful AI models and the Rust community for excellent development tools and libraries!

🤝 Contributions

Contributions are welcome! Feel free to submit Issues and Pull Requests!

About

An AI-Powered git commit message Generator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •