The freshest AI-powered git commit message generator
CommitMint uses AI to analyze your git diffs and generate multiple high-quality, conventional commit message options. Never stare at git commit -m "" again!
- AI-Powered: Generates multiple commit message options using state-of-the-art LLMs
- Conventional Commits: Follows the Conventional Commits specification
- Beautiful CLI: Rich, interactive terminal interface
- Multiple Providers: Support for OpenAI, Anthropic Claude, and Google Gemini
- Configurable: Save your preferences in ~/.mintrc
- Interactive: Select, edit, and commit all in one flow
- Smart Analysis: Understands your code changes and generates relevant messages
# Clone the repository
git clone https://github.com/colinkautz/commitmint.git
cd commitmint
# Install
pip install -e .- Initialize CommitMint (creates .envand~/.mintrc):
mint setup- 
Edit .envand add your API key for your preferred provider
- 
Stage your changes and generate: 
git add .
mint generateThat's it!
# Generate commit messages for staged changes
mint generate
# Preview messages for unstaged changes (won't commit)
mint generate --unstaged
# Auto-commit without confirmation
mint generate --commit# Use a different provider
mint generate --provider anthropic
# Use a specific model
mint generate --model gpt-4o
# Adjust temperature (creativity: 0.0 - 1.0)
mint generate --temp 0.5Note: Command-line options override your config file settings for that run only.
CommitMint stores configuration in ~/.mintrc:
# Show current configuration
mint config --show
# Edit config file in your default editor
mint config --edit
# Set specific values
mint config --set-provider anthropic
mint config --set-model claude-sonnet-4-5
mint config --set-temp 0.3# LLM Provider (openai, anthropic, google)
provider: openai
# Model name (leave empty to use provider default)
model: null
# Temperature for generation (0.0 = deterministic, 1.0 = creative)
temperature: 0.25
# Auto-commit without confirmation prompt
auto_commit: false
# Number of commit message options to generate (1-10)
num_options: 5| Provider | Default Model | API Key Required | 
|---|---|---|
| OpenAI | gpt-5 | OPENAI_API_KEY | 
| Anthropic | claude-sonnet-4-5 | ANTHROPIC_API_KEY | 
| gemini-2.5-flash | GOOGLE_API_KEY | 
# List all providers and check API key status
mint providersAdd your API keys to the .env file created by mint setup:
# OpenAI
OPENAI_API_KEY=your-openai-key
# Anthropic
ANTHROPIC_API_KEY=your-anthropic-key
# Google
GOOGLE_API_KEY=your-google-api-key$ mint generate
mint - Generating commit messages...
Using openai with model: gpt-4o
Generated commit messages:
┌───┬─────────────────────────────────────────────────────┬────────────┐
│ # │ Message                                             │ Confidence │
├───┼─────────────────────────────────────────────────────┼────────────┤
│ 1 │ feat(cli): add interactive commit message selection │        95% │
│ 2 │ feat: implement AI-powered commit generator         │        92% │
│ 3 │ chore: add CommitMint CLI tool                      │        88% │
│ 4 │ feat(git): add diff analysis and message generation │        90% │
│ 5 │ docs: add README and configuration examples         │        85% │
└───┴─────────────────────────────────────────────────────┴────────────┘
Select an option: [1/2/3/4/5/quit] (1): 1
Selected commit message:
┌─────────────────────────────────────────────────────────┐
│ feat(cli): add interactive commit message selection     │
│                                                         │
│ Implement a rich CLI interface that allows users to     │
│ select from AI-generated commit message options with    │
│ confidence scores.                                      │
└─────────────────────────────────────────────────────────┘
Do you want to edit this message? [y/n] (n): n
Do you want to commit this message? [y/n] (y): y
Committed successfully!mint generate          # Generate commit messages from staged changes
mint generate --help   # Show all generate options
mint setup             # Initialize .env and config files
mint providers         # List available LLM providers
mint config --show     # Display current configuration
mint config --edit     # Edit configuration filecommitmint/
├── commitmint/
│   ├── __init__.py
│   ├── cli.py           # CLI interface
│   ├── config.py        # Configuration management
│   ├── generator.py     # LLM message generation
│   ├── git_handler.py   # Git operations
│   ├── models.py        # Pydantic models
│   ├── providers.py     # LLM provider configs
│   └── prompts/
│       ├── system_prompt.txt
│       └── human_prompt.txt
├── pyproject.toml
├── requirements.txt
├── .env
└── README.md
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (git checkout -b feature/amazing-feature)
- Make your changes
- Push to your branch
- Open a Pull Request
GPL-3.0 License - see LICENSE for details
This ensures that any modifications or derivative works must also be open source under GPL-3.0.
- Found a bug? Open an issue
- Have a feature idea? Start a discussion
- Like CommitMint? Give us a star!
Made with care by Colin K.
Keep your commits fresh!