🙀 GitGud 🙀
Automatically generate commit messages to ship faster
🚀🚀🚀🚀🚀🚀🚀🚀
🔨 Install • 🚀 Get started • 🔧 Configuration
🔨 Install
Linux
Distribution | Repository | Instructions |
---|---|---|
Any | crates.io | cargo install gitgud --locked |
🚀 Get started
To get started you must initialize GitGud in your Git repository:
This will generate a .gitgud
folder containing the configuration allowing you to write your own guidelines based on the standards of the project.
By default GitGud uses OpenAI API to generate your commit messages requiring you to provide an API Key that you can create in your developer dashboard.
Once created you can either set the OPENAI_KEY
environment variable or add it in a .env
file at the root of the repository.
Then simply run the following command to commit:
gitgud
🔧 Configuration
Configuration is located in the .gitgud
folder and is made of two parts:
config.toml
: allows you to configure the model and the prompt variables.prompt.txt
: which correspond to the template used for the prompt.
Prompt
The prompt is a .txt
used as a tinytemplate allowing you to specify your commit message policies, guidelines, etc.
Special variables
git_diff
: contains the diff of staged files.
Config
The configuration allows you to configure the AI model used for generating messages as well as for providing variables to your prompt template making it easier to iterate.
[]
= "gpt-4.1-nano-2025-04-14"
[[]]
= "Commit with infrastructure changes"
= """
🧱 Added Horizontal Pod Autoscaling to helm charts
"""
[[]]
= "Commit with bug fixes"
= """
🐛 Fix homepage redirection with unknown browser language
"""
[!NOTE] The prompt option values are accessible from within the prompt template
Contributing
I'd love for you to contribute to this project. You can request new features by creating an issue, or submit a pull request with your contribution.