rc - Rust S3 CLI Client
A S3-compatible command-line client written in Rust.
Features
- 🚀 High Performance - Written in Rust with async concurrent operations
- 🔧 S3 Compatible - Supports RustFS, MinIO, AWS S3, and other S3-compatible services
- 📦 Cross-Platform - Supports Linux, macOS, and Windows
- 🎨 Friendly Output - Human-readable and JSON format output
- 🔒 Secure - Secure credential storage, no sensitive data in logs
Installation
Binary Download
Download the appropriate binary for your platform from the Releases page.
On Linux, use the default linux-amd64 / linux-arm64 artifacts for maximum compatibility (musl static build).
If you specifically need glibc-linked builds, use linux-amd64-gnu / linux-arm64-gnu.
Homebrew (macOS/Linux)
Scoop (Windows)
scoop bucket add rustfs https://github.com/rustfs/scoop-bucket
scoop install rustfs/rc
Cargo
Docker
# Show help
# Run a command with a local RustFS instance
Build from Source
Quick Start
Configure Aliases
# Add local S3 service
# Add AWS S3
# List all aliases
Basic Operations
# List buckets
# Create bucket
# Upload file
# Download file
# View object info
# Delete object
# Delete bucket
Advanced Operations
# Recursively copy directory
# Mirror between S3 locations
# Find objects
# List anonymous access rules
# Set anonymous access level
# Generate download link
# View directory tree
Admin Operations (IAM)
# List users
# Add a new user
# Create a policy
# Attach policy to user
# Create a service account (access_key + secret_key)
# Create a service account with inline policy file
# Manage bucket event notifications
# Manage bucket CORS configuration
|
Lifecycle (ILM) Operations
# Add lifecycle rule: expire objects after 30 days with prefix filter
# Add lifecycle rule: transition to remote tier after 90 days
# List lifecycle rules
# Edit an existing rule
# Remove a specific rule or all rules
# Export/import lifecycle configuration (JSON)
# Manage remote storage tiers
# Restore a transitioned (archived) object
Bucket Replication
# Replication requires versioning on both source and destination buckets
# Configure a remote alias with the destination RustFS endpoint URL.
# rc normalizes the remote target endpoint to the host:port form expected by
# the RustFS admin API when creating replication targets.
# Add a replication rule
# List replication rules
# View replication status/metrics
# Update a replication rule
# Remove replication rules
# Export/import replication configuration (JSON)
Admin Operations (Cluster)
# Cluster information
# Heal operations
# JSON output
Command Overview
| Command | Description |
|---|---|
alias |
Manage storage service aliases |
admin |
Manage IAM users, policies, groups, service accounts, and cluster operations |
ls |
List buckets or objects |
mb |
Make bucket |
rb |
Remove bucket |
cp |
Copy objects |
mv |
Move objects |
rm |
Remove objects |
cat |
Display object contents |
head |
Display first N lines of object |
stat |
Display object metadata |
find |
Find objects |
anonymous |
Manage anonymous access to buckets and objects |
diff |
Compare two locations |
mirror |
Mirror sync between S3 locations |
tree |
Tree view display |
share |
Generate presigned URLs |
event |
Manage bucket event notifications |
cors |
Manage bucket CORS configuration |
pipe |
Upload from stdin |
version |
Manage bucket versioning |
tag |
Manage bucket and object tags |
quota |
Manage bucket quota |
ilm |
Manage lifecycle rules, storage tiers, and object restore |
replicate |
Manage bucket replication |
completions |
Generate shell completion scripts |
Admin Subcommands
| Command | Description |
|---|---|
admin user |
Manage IAM users (add, remove, list, info, enable, disable) |
admin policy |
Manage IAM policies (create, remove, list, info, attach) |
admin group |
Manage IAM groups (add, remove, list, info, enable, disable, add-members, rm-members) |
admin service-account |
Manage service accounts (create, remove, list, info) |
admin info |
Display cluster information (cluster, server, disk) |
admin heal |
Manage cluster healing operations (status, start, stop) |
ILM Subcommands
| Command | Description |
|---|---|
ilm rule add |
Add a lifecycle rule to a bucket |
ilm rule edit |
Edit an existing lifecycle rule |
ilm rule list |
List lifecycle rules on a bucket |
ilm rule remove |
Remove lifecycle rules from a bucket |
ilm rule export |
Export lifecycle configuration as JSON |
ilm rule import |
Import lifecycle configuration from JSON |
ilm tier add |
Add a remote storage tier |
ilm tier edit |
Edit tier credentials |
ilm tier list |
List all configured storage tiers |
ilm tier info |
Show details for a specific tier |
ilm tier remove |
Remove a storage tier |
ilm restore |
Restore a transitioned (archived) object |
Replicate Subcommands
| Command | Description |
|---|---|
replicate add |
Add a new replication rule |
replicate update |
Update an existing replication rule |
replicate list |
List replication rules for a bucket |
replicate status |
Show replication status and metrics |
replicate remove |
Remove replication rules |
replicate export |
Export replication configuration as JSON |
replicate import |
Import replication configuration from JSON |
Output Format
Human-Readable (default)
JSON Format
Shell Completion
Generate and install shell completion scripts:
Bash
# Or add to .bashrc:
# source <(rc completions bash)
Zsh
# Ensure ~/.zfunc is in your fpath (add to .zshrc):
# fpath=(~/.zfunc $fpath)
# autoload -Uz compinit && compinit
Fish
PowerShell
rc completions powershell >> $PROFILE
Configuration
Configuration file is located at ~/.config/rc/config.toml:
= 1
[]
= "human"
= "auto"
= true
[[]]
= "local"
= "http://localhost:9000"
= "accesskey"
= "secretkey"
= "us-east-1"
Exit Codes
| Code | Description |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Usage/path error |
| 3 | Network error (retryable) |
| 4 | Authentication/permission error |
| 5 | Resource not found |
| 6 | Conflict/precondition failed |
| 7 | Feature not supported |
| 130 | Interrupted (Ctrl+C) |
Compatibility
Supported Backends
| Backend | Tier | Description |
|---|---|---|
| RustFS | Tier 1 | Fully supported |
| MinIO | Tier 2 | Fully supported |
| AWS S3 | Tier 3 | Best effort support |
| Other S3-compatible | Best Effort | No guarantee |
Minimum Rust Version
- Rust 1.92 or higher (Edition 2024)
Development
Build
Test
# Unit tests
# Integration tests (requires S3-compatible backend)
Lint
Contributing
Contributions are welcome! Please read AGENTS.md for development guidelines.
License
This project is dual-licensed under MIT or Apache-2.0. See LICENSE-MIT and LICENSE-APACHE.
Acknowledgments
- MinIO Client (mc) - Inspiration for CLI design
- aws-sdk-s3 - AWS S3 SDK for Rust