Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Rusty Commit (rco)
AI-powered commit message generator written in Rust. Generate conventional commits, GitMoji messages, and PR descriptions using 18+ AI providers.
Fast. Local-first options. Secure. Editor integrations via MCP.
Why Rusty Commit
- Speed: Native Rust binary with instant startup
- Choice: Works with 18+ AI providers (OpenAI, Anthropic/Claude, OpenRouter, Groq, DeepSeek, GitHub Copilot, Ollama, Fireworks, Moonshot/Kimi, Alibaba DashScope/Qwen, Mistral, and more)
- Secure: Optional keychain storage via
--features secure-storage - Flexible: Conventional commits, GitMoji, templates, multi-language
- Integrated: Git hooks, GitHub Actions, MCP server for editors
- Multi-account: Switch between multiple providers/accounts seamlessly
Contents
- Installation
- Quick Start
- Generate Commit Messages
- Interactive Mode
- PR Description Generation
- Examples
- Configuration
- Multi-Account Support
- Providers
- Git Hooks
- MCP Server
- Updates
- GitHub Action
- Advanced Options
- File Exclusion
- Troubleshooting
- Uninstall
- Compatibility
- Development
- Security & Verification
- License
- Credits
Installation
One-liner (recommended)
|
Security-conscious users: Verify the install script before running it.
The script auto-detects your platform and installs via Homebrew, .deb/.rpm, Cargo, or binary. All packages are cryptographically signed and verified automatically:
- Cosign/Sigstore signatures (keyless, modern)
- GPG signatures (traditional)
- SHA256 checksums
- GitHub build attestations
Homebrew (macOS/Linux)
Cargo
Debian/Ubuntu
Fedora/RHEL
Alpine Linux
# Direct .apk install (signed packages)
# Or via binary (all architectures):
# x86_64
|
# aarch64
|
# riscv64
|
Windows (Scoop)
Quick Start
Setup Wizard (Recommended for New Users)
Single Provider (Traditional)
# 1) Authenticate (Claude OAuth) or set an API key
# or
# 2) Generate a commit
Multi-Account (Recommended for Multiple Providers)
# 1) Add your first account (interactive wizard)
# 2) Add more accounts for different providers/roles
# 3) List all accounts
# 4) Switch between accounts
# 5) Generate commits (uses active account automatically)
Generate Commit Modes
Basic Generation
Multiple Variations
Generate up to 5 variations and choose the best one:
GitMoji Format
Clipboard Mode
Copy generated message to clipboard instead of committing:
Show Prompt (Debug)
Timing Information
Thinking Tags Stripping
For reasoning models (like DeepSeek R1) that output <thinking> tags:
Interactive Mode
When running rco without -y, you'll enter interactive mode:
- Review generated message - See the AI-generated commit message
- Edit before committing - Press key to edit in your
$EDITOR - Regenerate - Press key to generate a new variation
- Multiple variations - With
-g 3, see all variations and pick one
Workflow
# Choose to: edit, regenerate, select different variation, or abort
PR Description Generation
Generate comprehensive pull request descriptions from your changes:
Generate PR Description
Open PR in Browser
PR Description Features
- Analyzes all commits since base branch
- Groups changes by type (features, fixes, docs, etc.)
- Generates following PR template conventions
- Includes breaking changes and deprecation notices
Examples
Conventional Commit
feat(auth): fix token refresh edge-case
Handle clock-skew by allowing ±60s leeway during token expiry checks. Adds retry on 429 and surfaces actionable errors.
GitMoji (with --fgm)
✨ auth: robust token refresh with retry
Allow ±60s clock-skew; add backoff on 429; improve error messages for invalid credentials.
With Context
Configuration
Configuration Locations
- Global:
~/.config/rustycommit/config.{toml,json} - Per-repo:
.rustycommit.toml/.rco.toml - Environment Variables:
RCO_*prefix
Priority: Per-repo > Global > Environment variables > Defaults
Basic Commands
Common Configuration Keys
| Key | Description | Example |
|---|---|---|
RCO_AI_PROVIDER |
AI backend to use | anthropic, openai, ollama |
RCO_MODEL |
Model name | claude-3-5-haiku-20241022, gpt-4o-mini |
RCO_API_KEY |
API key | sk-..., gsk_... |
RCO_API_URL |
Custom endpoint | http://localhost:11434 |
RCO_COMMIT_TYPE |
Commit format | conventional, gitmoji |
RCO_EMOJI |
Include emojis | true, false |
RCO_LANGUAGE |
Output language | en, es, fr, zh, ja |
RCO_MAX_TOKENS |
Max response tokens | 1024 |
RCO_TEMPERATURE |
Response creativity | 0.7 (0.0-1.0) |
RCO_DIFF_TOKENS |
Max diff tokens | 12000 |
Set Multiple Values
Describe All Options
Multi-Account Support
Manage multiple AI provider accounts for different providers, models, or roles (work vs personal).
Account Management Commands
# Add a new account (interactive wizard)
# Add a specific provider with alias
# List all configured accounts
# Switch to a different account
# Show details of an account
# Remove an account
Interactive Add-Provider Wizard
Running rco config add-provider guides you through:
- Provider Selection - Choose from 18+ providers
- Account Alias - Memorable name (e.g., "work", "personal", "gpt-4")
- Model Name - Optional, defaults to provider's recommended model
- API URL - Optional, for custom endpoints or self-hosted providers
- API Key - Stored securely in system keychain
Account Configuration File
Accounts are stored in ~/.config/rustycommit/accounts.toml:
[]
= "openai"
= "gpt-4o-mini"
= "https://api.openai.com/v1"
[]
= "api_key"
= "rco_work_openai"
[]
= "anthropic"
= "claude-3-5-haiku-20241022"
[]
= "env_var"
= "ANTHROPIC_API_KEY"
[]
= "work-openai"
Authentication Methods
api_key- Stored securely in keychainoauth- OAuth tokens from providerenv_var- Read from environment variablebearer- Bearer tokens in keychain
Providers
Works with 18+ providers. Configure via RCO_AI_PROVIDER.
OAuth-Enabled Providers (use rco auth login)
- Claude (Anthropic): OAuth with PKCE for secure authentication
- Claude Code: OAuth for Claude Code subscription users
- GitHub Copilot: OAuth for Copilot access
API Key Providers
OpenAI
# Get keys: https://platform.openai.com/api-keys
Anthropic Claude
# OAuth (recommended)
# Or API key
# Keys: https://console.anthropic.com/settings/keys
Claude Code OAuth
# OAuth login (works for both Anthropic and Claude Code)
# Claude Code subscription users can use the Claude Code model
OpenRouter
# Keys: https://openrouter.ai/keys
Groq
# Keys: https://console.groq.com/keys
DeepSeek
# Keys: https://platform.deepseek.com/api-keys
xAI Grok
# Keys: https://x.ai/api
Mistral AI
# Keys: https://console.mistral.ai/api-keys
Google Gemini
# Keys: https://aistudio.google.com/app/apikey
Azure OpenAI
# Docs: https://learn.microsoft.com/azure/ai-services/openai
Perplexity
# Keys: https://www.perplexity.ai/settings/api
Ollama (Local)
# No API key needed for local models
Fireworks AI
# Keys: https://app.fireworks.ai/users/api-keys
Moonshot AI (Kimi)
# Docs: https://platform.moonshot.ai/docs
Alibaba DashScope (Qwen)
# Keys: https://dashscope.console.aliyun.com/apiKey
Together AI
# Keys: https://api.together.xyz/settings/api-keys
DeepInfra
# Keys: https://deepinfra.com/dash/api_keys
Vertex AI (Google Cloud)
# Requires gateway to Vertex's OpenAI-compatible endpoint
Secure Storage
When built with secure-storage feature:
- macOS: Keychain
- Linux: Secret Service (GNOME Keyring, KWallet, KeePassXC)
- Windows: Credential Manager
- Falls back to config file if unavailable
Git Hooks
Install Hook
The hook automatically generates commit messages when you run git commit without -m.
Optional Hooks (Advanced)
Configure pre/post hooks in config (globally or per-repo):
# Pre-generation hook (run before AI generates message)
# Pre-commit hook (after generation, can edit message)
# Post-commit hook (after git commit completes)
# Hook behavior
Per-Run Hook Control
Hook Environment Variables
Hooks receive these environment variables:
RCO_REPO_ROOT,RCO_PROVIDER,RCO_MODELRCO_MAX_TOKENS,RCO_DIFF_TOKENS,RCO_CONTEXT(pre-gen)RCO_COMMIT_MESSAGE,RCO_COMMIT_FILE(pre/post-commit)
MCP Server
Rusty Commit includes an MCP (Model Context Protocol) server for editor integrations.
Start MCP Server
TCP Mode (for Cursor, VS Code MCP extension):
STDIO Mode (for direct integration):
Editor Integration
Cursor
- Open Cursor Settings > Features > MCP
- Add new MCP server:
Type: HTTP URL: http://localhost:3000 - Or use stdio with cursor-agent
VS Code
- Install "MCP" extension by modelcontextprotocol
- Add server configuration in settings.json
Claude Code
|
MCP Tools Available
generate_commit- Generate commit message from staged changesgenerate_commit_message- Alias for generate_commitget_config- Get current configurationset_config- Set configuration valuelist_accounts- List configured accountsuse_account- Switch active account
Updates
Architectures
Prebuilt archives and packages for:
- Linux: x86_64 (gnu, musl), aarch64 (gnu, musl), armv7, riscv64
- macOS: x86_64, aarch64 (Apple Silicon)
- Windows: x86_64, i686
GitHub Action
name: AI Commits
on:
jobs:
ai-commit:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: hongkongkiwi/rusty-commit@main
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RCO_API_KEY: ${{ secrets.RCO_API_KEY }}
RCO_AI_PROVIDER: 'anthropic'
RCO_MODEL: 'claude-3-5-haiku-20241022'
GitHub Action Inputs
| Input | Description | Required |
|---|---|---|
RCO_API_KEY |
API key for AI provider | Yes |
RCO_AI_PROVIDER |
Provider name | No (default: anthropic) |
RCO_MODEL |
Model name | No |
RCO_COMMIT_TYPE |
conventional or gitmoji | No |
GITHUB_TOKEN |
GitHub token for commit | Yes |
Advanced Options
Token Management
For large diffs, Rusty Commit automatically chunks the input:
Commitlint Integration
Generate commitlint configuration:
Model Selection
List available models for your provider:
OAuth Authentication
File Exclusion
Exclude Files from AI Analysis
Via command line:
Via .rcoignore file:
Create .rcoignore in your repository root:
# Dependencies
node_modules/
vendor/
Cargo.lock
# Build artifacts
*.min.js
*.map
dist/
build/
# IDE
.idea/
.vscode/
*.swp
# OS
.DS_Store
Thumbs.db
# Logs
*.log
npm-debug.log*
Files matching patterns in .rcoignore are excluded from the diff sent to AI.
Troubleshooting
| Issue | Solution |
|---|---|
| 401 / Invalid API key | Re-authenticate (rco auth login) or set valid RCO_API_KEY. For accounts, check rco config show-account. |
| Rate-limited (429) | Wait briefly; try lighter model or switch accounts (rco config use-account <alias>). |
| Secure storage unavailable | Falls back to file storage; check rco config status. Build with secure-storage feature for keychain support. |
| Account not found | Verify accounts exist with rco config list-accounts. Use exact alias name when switching. |
| Wrong account used | Check active account with rco config show-account. Switch with rco config use-account <alias>. |
| Hooks not running | Ensure .git/hooks/prepare-commit-msg exists and is executable. Re-install via rco hook set. |
| MCP server connection refused | Ensure server is running (rco mcp server). Check port matches editor config. |
| OAuth browser not opening | Set BROWSER=none to get URL manually, or use rco auth login --no-browser. |
| Windows PATH issues | Add install dir (%USERPROFILE%\.cargo\bin) to PATH. |
| Corporate proxy | Set HTTP_PROXY/HTTPS_PROXY environment variables. |
| Large diff truncated | Increase RCO_DIFF_TOKENS or exclude files with .rcoignore / -x. |
| Reasoning model outputs thinking tags | Use --strip-thinking flag or set RCO_STRIP_THINKING=true. |
| Commit message too long | Decrease RCO_MAX_TOKENS or set RCO_COMMIT_TYPE=conventional. |
Debug Mode
RUST_LOG=debug
Uninstall
- Homebrew:
brew uninstall rusty-commit - Cargo:
cargo uninstall rusty-commit - APT:
sudo apt remove rusty-commit - RPM:
sudo rpm -e rusty-commit - Remove config:
rm -rf ~/.config/rustycommit/ - Remove accounts:
rm -f ~/.config/rustycommit/accounts.toml
Compatibility
- Git 2.23+
- Rust 1.70+
- Works with per-repo overrides, multiple providers, and multi-account configurations
- Accounts stored separately in
~/.config/rustycommit/accounts.toml
Provider Compatibility Matrix
| Provider | OAuth | API Key | Local | Notes |
|---|---|---|---|---|
| OpenAI | No | Yes | No | |
| Anthropic | Yes | Yes | No | Claude, Claude Code |
| OpenRouter | No | Yes | No | Aggregator |
| Groq | No | Yes | No | Fast inference |
| DeepSeek | No | Yes | No | |
| Ollama | No | No | Yes | Local models |
| Gemini | No | Yes | No | |
| Azure | No | Yes | No | |
| xAI | No | Yes | No | Grok |
| Mistral | No | Yes | No | |
| Perplexity | No | Yes | No | |
| Fireworks | No | Yes | No | |
| Moonshot | No | Yes | No | Kimi |
| DashScope | No | Yes | No | Qwen |
| Together | No | Yes | No | |
| DeepInfra | No | Yes | No | |
| GitHub Copilot | Yes | No | No |
Development
# Build
# Test
# Lint
# Documentation
Just Commands
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Run
cargo fmtandcargo clippy - Add tests for new functionality
- Submit a PR
Security & Verification
All releases are cryptographically signed with multiple methods for maximum security.
Automatic Verification
The install script automatically verifies all downloads using the strongest available method.
Manual Verification
# Modern: Cosign/Sigstore (recommended)
# Traditional: GPG signatures
# GitHub attestations
# Package signatures (native)
Full verification guide: docs/VERIFICATION.md
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.
Credits
Rusty Commit is inspired by the original OpenCommit by @di-sukharev.
Build faster. Commit smarter.