gitgud 1.0.0

A CLI tool to automate commit messages
gitgud-1.0.0 is not a library.

🙀 GitGud 🙀

Automatically generate commit messages to ship faster

🚀🚀🚀🚀🚀🚀🚀🚀

PRs Welcome License

Crates.io Total Downloads Crates.io Version

🔨 Install🚀 Get started🔧 Configuration

ContributeLicense

🔨 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:

gitgud init

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.

[ai.openai]
model = "gpt-4.1-nano-2025-04-14"

[[prompt.examples]]
title = "Commit with infrastructure changes"
content = """
🧱 Added Horizontal Pod Autoscaling to helm charts
"""

[[prompt.examples]]
title = "Commit with bug fixes"
content = """
🐛 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.