Skip to content

Emin017/git-commit-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Git Commit Generator (git-msg)

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-msg --help

Using Nix

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

βš™οΈ 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-msg # Use different commit format git-msg --format conventional # Use different model git-msg --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, also known as git-msg.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •