commitmate

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2025 License: MIT Imports: 1 Imported by: 0

README ยถ

commitmate

๐Ÿค– AI-powered Git commit message generator

English | ํ•œ๊ตญ์–ด

Go Version Release

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

# 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
export COMMITMATE_JIRA_INTEGRATION=true  # JIRA integration

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.

How it works

If your branch name contains a JIRA issue pattern (e.g., PROJECT-123, DEVOPS2-430), it will be automatically detected and added to the beginning of your commit message.

Example:

# Create branch
git checkout -b DEVOPS2-430-add-user-feature

# Generate commit
git add .
commitmate

# Result: [DEVOPS2-430] feat: add user authentication
Configuration
# Enable JIRA integration (default)
commitmate config set-jira-integration true

# Disable JIRA integration
commitmate config set-jira-integration false
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

Documentation ยถ

The Go Gopher

There is no documentation for this package.

Directories ยถ

Path Synopsis
internal
ai
git

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL