🦀 Rusty Commit (rco)
AI-powered commit message generator written in Rust
Generate conventional commits, GitMoji messages, and PR descriptions using 18+ AI providers
🚀 Fast · 🔒 Secure · 🏠 Local-first · 🔌 Editor integrations via MCP
Installation · Quick Start · Features · Providers · Configuration · Git Hooks
✨ Why Rusty Commit?
⚡ Blazing Fast
Native Rust binary with instant startup time. No Node.js bloat, no waiting.
🤖 18+ AI Providers
Works with OpenAI, Claude, OpenRouter, Groq, DeepSeek, GitHub Copilot, Ollama, and more.
🔐 Secure by Default
Optional keychain storage keeps your API keys safe. OAuth support for major providers.
🎨 Flexible Formats
Conventional commits, GitMoji, or custom templates. Multi-language support.
🔄 Multi-Account Support
Seamlessly switch between work and personal accounts, different providers, or models.
🔌 Editor Integration
MCP server for Cursor, VS Code, Claude Code, and other AI-powered editors.
📦 Installation
One-liner (recommended)
|
# Download and inspect
# Verify with SHA256 checksums, Cosign, GPG, or GitHub attestations
# See: docs/INSTALL-SCRIPT-VERIFICATION.md
Package Managers
| Platform | Command |
|---|---|
| Homebrew | brew tap hongkongkiwi/tap && brew install rusty-commit |
| Cargo | cargo install rusty-commit --features secure-storage |
| Debian/Ubuntu | wget .../rusty-commit_amd64.deb && sudo dpkg -i rusty-commit_amd64.deb |
| Fedora/RHEL | sudo dnf install https://.../rusty-commit.x86_64.rpm |
| Alpine | wget .../rusty-commit-x86_64.apk && sudo apk add --allow-untrusted rusty-commit-x86_64.apk |
| Windows (Scoop) | scoop install rusty-commit |
| Windows (Binary) | Download from releases |
🚀 Quick Start
Interactive Setup Wizard
The easiest way to get started with Rusty Commit:
Quick Setup will ask you:
- AI Provider - Choose from 15+ providers (OpenAI, Anthropic, Gemini, Ollama, etc.)
- API Key - Securely stored in your system's keychain
- Commit Format - Conventional commits, GitMoji, or simple
Advanced Setup additionally includes:
- Custom model selection and API endpoints
- Commit message style (capitalization, max length, language)
- Behavior settings (auto-push, commit body, variations)
- Token limits and hook configuration
Generate Your First Commit
# 1. Stage your changes
# 2. Generate commit message
# 3. Review, edit, or regenerate interactively
Multi-Account Workflow (Recommended)
# Add multiple provider accounts
# Switch between them
&&
&&
🎯 Features
📝 Commit Message Generation
😄 GitMoji Support
Output:
✨ feat(auth): implement OAuth2 PKCE flow
🔐 Add secure authentication with automatic token refresh.
Supports GitHub, GitLab, and generic OAuth2 providers.
📋 Clipboard Mode
🔍 Debug Tools
RUST_LOG=debug
🤖 Providers
Rusty Commit works with 18+ AI providers out of the box. Configure them interactively with rco setup or manually as shown below:
💡 Tip: Use
rco setupfor interactive provider configuration with step-by-step guidance.
🔑 OAuth-Enabled (No API Key Required)
| Provider | Command |
|---|---|
| Claude (Anthropic) | rco auth login |
| Claude Code | rco auth login |
| GitHub Copilot | rco auth login --provider github-copilot |
🔐 API Key Providers
| Provider | Setup |
|---|---|
| OpenAI | rco config set RCO_AI_PROVIDER=openai RCO_API_KEY=sk-... RCO_MODEL=gpt-4o-mini |
| Anthropic | rco config set RCO_AI_PROVIDER=anthropic RCO_API_KEY=sk-ant-... RCO_MODEL=claude-3-5-haiku-20241022 |
| OpenRouter | rco config set RCO_AI_PROVIDER=openrouter RCO_API_KEY=sk-or-... |
| Groq | rco config set RCO_AI_PROVIDER=groq RCO_API_KEY=gsk_... RCO_MODEL=llama-3.1-70b-versatile |
| DeepSeek | rco config set RCO_AI_PROVIDER=deepseek RCO_API_KEY=sk-... RCO_MODEL=deepseek-chat |
| xAI/Grok | rco config set RCO_AI_PROVIDER=xai RCO_API_KEY=... RCO_MODEL=grok-beta |
| Mistral | rco config set RCO_AI_PROVIDER=mistral RCO_API_KEY=... RCO_MODEL=mistral-small-latest |
| Google Gemini | rco config set RCO_AI_PROVIDER=gemini RCO_API_KEY=... RCO_MODEL=gemini-pro |
| Azure OpenAI | rco config set RCO_AI_PROVIDER=azure RCO_API_KEY=... RCO_API_URL=https://<resource>.openai.azure.com |
| Perplexity | rco config set RCO_AI_PROVIDER=perplexity RCO_API_KEY=... |
| Ollama (Local) | rco config set RCO_AI_PROVIDER=ollama RCO_MODEL=mistral RCO_API_URL=http://localhost:11434 |
| Fireworks | rco config set RCO_AI_PROVIDER=fireworks RCO_API_KEY=... |
| Moonshot/Kimi | rco config set RCO_AI_PROVIDER=moonshot RCO_API_KEY=... RCO_API_URL=https://api.moonshot.cn/v1 RCO_MODEL=kimi-k2 |
| Alibaba Qwen | rco config set RCO_AI_PROVIDER=dashscope RCO_API_KEY=... RCO_API_URL=https://dashscope.aliyuncs.com/compatible-mode/v1 RCO_MODEL=qwen3-coder-32b-instruct |
| Together AI | rco config set RCO_AI_PROVIDER=together RCO_API_KEY=... |
| DeepInfra | rco config set RCO_AI_PROVIDER=deepinfra RCO_API_KEY=... |
When built with --features secure-storage:
- macOS: Keychain
- Linux: Secret Service (GNOME Keyring, KWallet, KeePassXC)
- Windows: Credential Manager
Falls back to config file if keychain is unavailable.
⚙️ Configuration
Interactive Configuration
The easiest way to configure Rusty Commit is through the setup wizard:
Configuration Priority
Per-repo config > Global config > Environment variables > Defaults
Manual Config Commands
Common Options
| Key | Description | Default |
|---|---|---|
RCO_AI_PROVIDER |
AI backend | anthropic |
RCO_MODEL |
Model name | Provider-specific |
RCO_API_KEY |
API key | - |
RCO_API_URL |
Custom endpoint | - |
RCO_COMMIT_TYPE |
Commit format | conventional |
RCO_EMOJI |
Include emojis | false |
RCO_LANGUAGE |
Output language | en |
RCO_MAX_TOKENS |
Max response tokens | 1024 |
RCO_TEMPERATURE |
Response creativity | 0.7 |
RCO_ENABLE_COMMIT_BODY |
Add commit body with context | false |
RCO_LEARN_FROM_HISTORY |
Learn style from git history | false |
RCO_HISTORY_COMMITS_COUNT |
Commits to analyze for style | 50 |
🎣 Git Hooks
Install/Uninstall
Once installed, git commit (without -m) automatically generates commit messages!
Advanced Hooks
# Pre-generation hook
# Pre-commit hook
# Post-commit hook
# Hook behavior
Skip Hooks (Per-Run)
🧠 Advanced Features
Repository Context Awareness
Rusty Commit automatically detects and includes project context for better commit messages:
# Create custom context file
Auto-detected context sources:
.rco/context.txt- Custom project descriptionREADME.md- First paragraphCargo.toml- Rust project descriptionpackage.json- Node.js project description
Commit Body Generation
Enable detailed commit messages with body explaining the "why":
Output:
feat(auth): implement OAuth2 PKCE flow
- Add secure token storage with automatic refresh
- Support GitHub, GitLab, and generic OAuth2 providers
- Handle token expiration gracefully
Style Learning from History
Automatically learn and match your team's commit style:
Analyzes last 50 commits to detect:
- Common commit types and scopes
- Average description length
- Capitalization preferences
- Gitmoji usage patterns
Enhanced GitMoji Support
25+ emojis from gitmoji.dev specification:
| Emoji | Meaning | Use Case |
|---|---|---|
| ✨ | :sparkles: |
New feature |
| 🐛 | :bug: |
Bug fix |
| 📝 | :memo: |
Documentation |
| 🎨 | :art: |
Code structure/format |
| ♻️ | :recycle: |
Refactoring |
| ⚡ | :zap: |
Performance |
| ✅ | :white_check_mark: |
Tests |
| 🔒 | :lock: |
Security fix |
| ⬆️ | :arrow_up: |
Upgrade dependencies |
| 🔥 | :fire: |
Remove code/files |
| 🚀 | :rocket: |
Deployment |
| 💥 | :boom: |
Breaking changes |
🎨 Custom Skills
Create reusable commit message templates and prompt customizations:
# List available skills
# Create a new skill
# Create project-specific skill
# Show skill details
# Remove a skill
Skill Structure
Skills are stored in ~/.config/rustycommit/skills/ (or .rco/skills/ for project-specific):
my-skill/
├── skill.toml # Skill manifest
├── prompt.md # Custom prompt template
└── hooks/ # Optional hooks
├── pre_gen.sh
└── post_gen.sh
Custom Prompt Template
Create prompt.md with placeholders:
Analyze this {language} code change:
{diff}
Context: {context}
Format: {commit_type}
Max length: {max_length}
Generate a commit message following our team conventions:
- --
🔌 MCP Server
Rusty Commit includes an MCP (Model Context Protocol) server for editor integrations.
Start the Server
# TCP Mode (Cursor, VS Code)
# STDIO Mode (Direct integration)
Editor Setup
Cursor:
Settings > Features > MCP > Add Server
Type: HTTP
URL: http://localhost:3000
Claude Code:
|
Available MCP Tools
generate_commit- Generate commit from staged changesget_config/set_config- Manage configurationlist_accounts/use_account- Switch accounts
🔄 Multi-Account Support
Perfect for switching between work and personal projects!
# Add accounts
# Manage accounts
Account Configuration
Accounts stored in ~/.config/rustycommit/accounts.toml:
[]
= "openai"
= "gpt-4o-mini"
[]
= "anthropic"
= "claude-3-5-haiku-20241022"
[]
= "work-openai"
📋 PR Description Generation
Features:
- Analyzes all commits since base branch
- Groups changes by type (features, fixes, docs, etc.)
- Follows PR template conventions
- Includes breaking changes and deprecation notices
🚫 File Exclusion
Exclude files from AI analysis via .rcoignore:
# Dependencies
node_modules/
vendor/
Cargo.lock
# Build artifacts
*.min.js
*.map
dist/
build/
# IDE
.idea/
.vscode/
# OS
.DS_Store
Thumbs.db
Or via command line:
🔄 Updates
🏃 GitHub Action
Use in CI/CD workflows:
name: AI Commits
on:
jobs:
ai-commit:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: hongkongkiwi/action-rusty-commit@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RCO_API_KEY: ${{ secrets.RCO_API_KEY }}
RCO_AI_PROVIDER: 'anthropic'
RCO_MODEL: 'claude-3-5-haiku-20241022'
See action-rusty-commit for details.
🛠️ Troubleshooting
| Issue | Solution |
|---|---|
| 401 / Invalid API key | Re-authenticate: rco auth login or set RCO_API_KEY |
| 429 Rate-limited | Wait briefly; try lighter model or switch accounts |
| Secure storage unavailable | Falls back to file; check rco config status |
| Hooks not running | Ensure .git/hooks/prepare-commit-msg is executable |
| OAuth browser not opening | Use rco auth login --no-browser |
| Large diff truncated | Increase RCO_DIFF_TOKENS or use .rcoignore |
| Reasoning model thinking tags | Use --strip-thinking flag |
Debug Mode
RUST_LOG=debug
🧪 Development
# Build
# Test
# Lint
# Just commands
🔒 Security & Verification
All releases are cryptographically signed with multiple methods:
Automatic Verification
The install script automatically verifies downloads using the strongest available method.
Manual Verification
# Cosign/Sigstore (modern)
# GPG (traditional)
# GitHub attestations
See docs/VERIFICATION.md for details.
💖 Support the Project
If Rusty Commit saves you time, consider supporting ongoing development:
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
Inspired by OpenCommit · Built with 🦀 Rust
Build faster. Commit smarter.