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 more using 16+ AI providers.
Fast. Local-first options. Secure. Editor integrations via MCP.
š Why Rusty Commit
- Speed: Native Rust binary with instant startup
- Choice: Works with 16+ AI providers (OpenAI, Anthropic/Claude, OpenRouter, Groq, DeepSeek, GitHub Copilot, Ollama, Fireworks, Moonshot/Kimi, Alibaba DashScope/Qwenā¦)
- Secure: Optional keychain storage via
--features secure-storage - Flexible: Conventional commits, GitMoji, templates, multiālanguage
- Integrated: Git hooks, GitHub Actions, MCP server for editors
Contents
- Installation
- Quick start
- Examples
- Configuration
- Providers
- CLI overview
- Git hooks
- Updates
- GitHub Action
- Advanced
- Troubleshooting
- Uninstall
- Compatibility
- Development
- 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
Alpine Linux
# Direct .apk install (signed packages)
# Or via binary (all architectures):
# x86_64
|
# aarch64
|
# riscv64
|
Quick start
# 1) Authenticate (Claude OAuth) or set an API key
# or
# 2) Generate a commit
Useful flags:
Examples
Conventional commit example:
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 example (with --fgm or RCO_COMMIT_TYPE=gitmoji):
⨠auth: robust token refresh with retry
Allow ±60s clock-skew; add backoff on 429; improve error messages for invalid credentials.
Configuration
- Global:
~/.config/rustycommit/config.{toml,json} - Perārepo:
.rustycommit.toml/.rco.toml
Basics:
Common keys (compact):
| Key | What it does | Example |
|---|---|---|
RCO_AI_PROVIDER |
Which AI backend to use | anthropic, openai, openrouter, groq, ollama, github-copilot, ... |
RCO_MODEL |
Model name for the provider | claude-3-5-haiku-20241022, gpt-4o-mini, llama-3.1-70b-versatile |
RCO_API_KEY |
API key if required | sk-..., gsk_..., etc. |
RCO_API_URL |
Custom endpoint (e.g., Ollama) | http://localhost:11434 |
RCO_COMMIT_TYPE |
Commit format | conventional or gitmoji |
RCO_EMOJI |
Emojis in messages | true / false |
RCO_LANGUAGE |
Output language | en, es, fr, ... |
Tip: You can set multiple values at once:
Providers
Works with 16+ providers. Examples:
- Claude (OAuth):
rco auth login - OpenAI / OpenRouter / Groq / DeepSeek / GitHub Copilot:
rco auth loginorrco config set RCO_API_KEY=... - Ollama (local):
# Remote Ollama:
Security & storage (optional secure-storage feature):
- macOS: Keychain
- Linux: Secret Service (GNOME Keyring / KWallet / KeePassXC)
- Windows: Credential Manager
- Automatic fallback to config file if unavailable
Providerāspecific examples
OpenAI:
# Optional custom endpoint:
# rco config set RCO_API_URL=https://api.openai.com/v1
# Get API key: https://platform.openai.com/api-keys
Anthropic (Claude):
# OAuth (recommended)
# Or API key
# API docs & keys: https://console.anthropic.com/settings/keys
OpenRouter:
# Keys: https://openrouter.ai/keys
Groq:
# Keys: https://console.groq.com/keys
DeepSeek:
# Keys: https://platform.deepseek.com/api-keys
Together AI:
# Keys: https://api.together.xyz/settings/api-keys
DeepInfra:
# Keys: https://deepinfra.com/dash/api_keys
Mistral AI:
# Keys: https://console.mistral.ai/api-keys
Azure OpenAI:
# Use your deployment name, not the model name
# Docs: https://learn.microsoft.com/azure/ai-services/openai/how-to/create-resource
Google Gemini:
# Keys: https://aistudio.google.com/app/apikey
Perplexity:
# Optional: custom endpoint
# rco config set RCO_API_URL=https://api.perplexity.ai/chat/completions
# Keys: https://www.perplexity.ai/settings/api
Fireworks AI:
# Keys: https://app.fireworks.ai/users/api-keys
Moonshot AI (Kimi):
# Docs & keys: https://platform.moonshot.ai/docs/introduction#text-generation-model
Alibaba Model Studio (DashScope / Qwen Coder):
# Docs: https://www.alibabacloud.com/help/en/model-studio/qwen-coder
# Keys: https://dashscope.console.aliyun.com/apiKey
Vertex AI (Google Cloud):
# Set up a service that proxies to Vertexās OpenAI-compatible endpoint or use a gateway
# Example placeholder (requires gateway):
# Getting started: https://cloud.google.com/vertex-ai/docs/generative-ai/start/quickstarts
Git hooks
Optional pre/post hooks (advanced)
Disabled by default. If you want to run custom commands around commit generation, set these keys (globally or perārepo). Hooks run in your shell and support strict mode and timeouts.
Config keys:
RCO_PRE_GEN_HOOK: commands before message generationRCO_PRE_COMMIT_HOOK: commands after generation; may edit the message viaRCO_COMMIT_FILERCO_POST_COMMIT_HOOK: commands aftergit commitRCO_HOOK_STRICT(defaulttrue),RCO_HOOK_TIMEOUT_MS(default30000)
Examples:
# Run lint and tests before generating the message
# Allow a script to edit the commit message before committing
# Push after committing
# Looser behavior with longer timeout
# Perārun disable
Hooks receive 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ācommit and postācommit)
Updates
Architectures
Prebuilt archives and packages are provided for:
- Linux: x86_64 (gnu, musl), aarch64 (gnu, musl), armv7 (gnueabihf), riscv64 (gnu, musl)
- macOS: x86_64, aarch64
- Windows: x86_64, i686
GitHub Action (minimal)
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'
Advanced
- MCP server (for editors like Cursor):
rco mcp server --port 3000orrco mcp stdio - Commitlint config:
rco commitlint
CLI overview
Subcommands:
configā set/get/reset values and check secure storage statushookā install/uninstall git hookscommitlintā generate commitlint configurationauthā login/logout/status for OAuth (e.g., Claude)mcpā run MCP server over TCP or stdioupdateā check and install updates (supports Homebrew, Cargo, .deb/.rpm, binary, Snap)
Global flags you can use with the default rco command:
--fgm Use full GitMoji specification
-c, --context <TEXT> Additional context for the commit
-y, --yes Skip confirmation
--show-prompt Print the AI prompt and exit
Troubleshooting
- 401 / Invalid API key: Reāauthenticate (
rco auth login) or set a validRCO_API_KEY. - Rateālimited (429): Wait briefly; try a lighter model or another provider.
- Secure storage unavailable: We automatically fall back to file storage; check
rco config status. - Hooks not running: Ensure
.git/hooks/prepare-commit-msgexists and is executable. Reāinstall viarco hook set. - Windows PATH issues: Add the install dir (e.g.,
%USERPROFILE%\\.cargo\\bin) to PATH. - Corporate proxy: Set
HTTP_PROXY/HTTPS_PROXYenvironment variables.
Uninstall
- Homebrew:
brew uninstall rusty-commit - Cargo:
cargo uninstall rusty-commit - Remove config: delete
~/.config/rustycommit/
Compatibility
- Works with perārepo overrides and multiple providers.
Development
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 on your system.
Manual Verification
For manual downloads, you can verify package authenticity:
# 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.