fuckmit
AI-powered git commit message generator implemented in Rust.
Features
- Generate commit messages using AI based on your staged changes
- Support for multiple AI providers (OpenAI, Anthropic, Qwen)
- Customizable prompts for generating commit messages
- Exclude specific files from the diff (e.g., package-lock.json)
- Dry-run mode to preview commit messages without creating a commit
Installation
Binary Releases
For Windows, Mac OS(10.12+) or Linux, you can download a binary release here.
Homebrew
From crates.io
From Source
If you have already installed the Rust toolchain (including cargo), you can directly use the following command to install from the GitHub repository:
Or manually clone and build:
# Clone the repository
# Build the project
# Install the binary
Usage
# Show help
# Generate a commit message and create a commit
# Generate a commit message without creating a commit (dry-run mode)
# or
# Authenticate with a provider
# or
# or set specific provider properties
# Manage commit configurations
Customizing Commit Messages
You can customize the prompts used for generating commit messages by creating a .fuckmit.yml or .fuckmit.yaml file either in your current working directory or in the global config directory (Linux: ~/.config/fuckmit/ or MacOS: ~/Library/Application Support/fuckmit/ or Windows: C:\Users\<username>\AppData\Roaming\fuckmit or FUCKMIT_CONFIG_DIR environment variable).
The file should have the following format:
prompt:
system: |
Your custom system prompt here
user: |
Your custom user prompt template here
{{diff}}
# Optional: exclude specific files from the diff
exclude:
- "package-lock.json"
- "**/node_modules/**"
- "dist/**"
The {{diff}} placeholder will be replaced with the actual git diff content.
Zsh Plugin
A Zsh plugin is available to provide convenient aliases and functions for fuckmit.
See the plugin for more details and other installation methods.
Development
# Run tests
# Build the project
# Run in development mode
License
MIT