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)
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)
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 |
pipe |
Upload from stdin |
version |
Manage bucket versioning |
tag |
Manage bucket and object tags |
quota |
Manage bucket quota |
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) |
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