commitmate
π€ AI-powered Git commit message generator
English | νκ΅μ΄

Contributing | Changelog
Features
- β¨ AI-powered commit message generation: Supports OpenAI GPT and Anthropic Claude
- π Conventional Commits format: Industry-standard commit message convention
- π Multilingual support: Korean/English commit messages and UI
- π« JIRA integration: Auto-add JIRA issue numbers from branch names
- π― Simple usage: Commit with a single command
- βοΈ Flexible configuration: Choose API keys and providers
- π Cross-platform: Linux, macOS, Windows support
Installation
Homebrew (Recommended) πΊ
# Add tap
brew tap leehosu/tap
# Install
brew install commitmate
# Verify
commitmate version
Binary Download
Download the binary for your OS from the latest release:
Releases
# macOS/Linux
tar -xzf commitmate_*_*.tar.gz
chmod +x commitmate
sudo mv commitmate /usr/local/bin/
# Windows
# Extract commitmate.exe and add to PATH
Quick Start
1. Set API Key
Using OpenAI:
commitmate config set-key openai sk-xxxxx
commitmate config set-provider openai
Using Claude:
commitmate config set-key claude sk-ant-xxxxx
commitmate config set-provider claude
2. Generate Commit
# After making changes
git add .
# AI automatically generates commit message and commits
commitmate
Usage
Basic Commands
# Basic usage (analyze staged changes and commit)
commitmate
# Generate message only without committing
commitmate --dry-run
# Use specific AI provider (one-time)
commitmate --provider openai
commitmate --provider claude
# Skip git hooks
commitmate --no-verify
Configuration Management
# Set API key
commitmate config set-key openai sk-xxxxx
commitmate config set-key claude sk-ant-xxxxx
# Set default provider
commitmate config set-provider openai
# Change model
commitmate config set-model openai gpt-4o-mini
commitmate config set-model claude claude-3-5-haiku-20241022
# Language settings
commitmate config set-commit-language ko # Commit message language (ko/en)
commitmate config set-ui-language en # UI language (ko/en)
# JIRA integration
commitmate config set-jira-integration true # Enable JIRA integration
commitmate config set-jira-integration false # Disable JIRA integration
# Show current configuration
commitmate config show
# Check version
commitmate version
Environment Variables
You can also configure using environment variables:
export COMMITMATE_OPENAI_API_KEY=sk-xxxxx
export COMMITMATE_CLAUDE_API_KEY=sk-ant-xxxxx
export COMMITMATE_PROVIDER=openai
export COMMITMATE_COMMIT_LANGUAGE=ko # Commit message language
export COMMITMATE_UI_LANGUAGE=en # UI language
Conventional Commits
commitmate follows the Conventional Commits format:
<type>(<scope>): <subject>
[optional body]
[optional footer]
Supported types:
feat: A new feature
fix: A bug fix
docs: Documentation changes
style: Code formatting (no functional changes)
refactor: Code refactoring
test: Adding/modifying tests
chore: Build, config, and other changes
perf: Performance improvements
ci: CI configuration changes
build: Build system changes
revert: Revert previous commit
Multilingual Support
commitmate supports both Korean and English:
Commit Message Language
Configure the language for AI-generated commit messages:
# English commit messages (default, suitable for global teams)
commitmate config set-commit-language en
# Korean commit messages
commitmate config set-commit-language ko
UI Language
Configure the CLI interface language:
# Korean UI (default)
commitmate config set-ui-language ko
# English UI
commitmate config set-ui-language en
Usage Scenarios
Scenario 1: Korean developer, global team
commitmate config set-commit-language en # English commit messages
commitmate config set-ui-language ko # Korean UI
Scenario 2: International developer, Korean company
commitmate config set-commit-language ko # Korean commit messages
commitmate config set-ui-language en # English UI
Scenario 3: All in English
commitmate config set-commit-language en # English commit messages
commitmate config set-ui-language en # English UI
JIRA Integration
commitmate automatically detects JIRA issue numbers from branch names and adds them to commit messages - no configuration needed!
How it works
Simply create a branch with a JIRA issue pattern (e.g., PROJECT-123, DEVOPS2-430) and commitmate will automatically detect and add it to your commit message.
With JIRA pattern:
# Create branch with JIRA issue
git checkout -b DEVOPS2-430-add-user-feature
# Generate commit
git add .
commitmate
# Result: [DEVOPS2-430] feat: add user authentication
Without JIRA pattern:
# Regular branch name
git checkout -b feature/add-auth
# Generate commit
git add .
commitmate
# Result: feat: add user authentication (no JIRA prefix)
Automatic behavior
commitmate always works automatically:
- β
Detects JIRA patterns in branch names
- β
Adds
[ISSUE-123] prefix if pattern is found
- β
Skips prefix if no JIRA pattern exists
- β
No configuration or environment variables needed
- β
Excludes special branches (main, master, develop)
Supported patterns
PROJECT-123
ABC-456
DEVOPS2-430
- Standard JIRA project key + number combinations
Note: JIRA issue numbers are not added when on main, master, or develop branches.
Example
$ git add .
$ commitmate
π Analyzing staged changes...
β¨ AI generated commit message:
feat(auth): add JWT authentication middleware
? Do you want to use this commit message?
βΈ Yes - commit
Edit - edit and commit
Regenerate - generate again
Cancel
β Commit completed successfully!
License
MIT License - See LICENSE file
Contributing
Issues and PRs are welcome!
Author
@leehosu