A S3-compatible command-line client written in Rust.
- 🚀 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
Download the appropriate binary for your platform from the Releases page.
brew install rustfs/tap/rc
cargo install rustfs-cli
git clone https://github.com/rustfs/cli.git
cd cli
cargo build --release# Add local S3 service rc alias set local http://localhost:9000 accesskey secretkey # Add AWS S3 rc alias set s3 https://s3.amazonaws.com AKIAIOSFODNN7EXAMPLE wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY # List all aliases rc alias list
# List buckets rc ls local/ # Create bucket rc mb local/my-bucket # Upload file rc cp ./file.txt local/my-bucket/ # Download file rc cp local/my-bucket/file.txt ./ # View object info rc stat local/my-bucket/file.txt # Delete object rc rm local/my-bucket/file.txt # Delete bucket rc rb local/my-bucket
# Recursively copy directory rc cp -r ./local-dir/ local/bucket/remote-dir/ # Sync directories rc mirror ./local-dir local/bucket/remote-dir # Find objects rc find local/bucket --name "*.txt" --newer-than 1d # Generate download link rc share download local/bucket/file.txt --expire 24h # View directory tree rc tree local/bucket -L 3
| Command | Description |
|---|---|
alias |
Manage storage service aliases |
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 object header |
stat |
Display object metadata |
find |
Find objects |
diff |
Compare two locations |
mirror |
Mirror sync |
tree |
Tree view display |
share |
Generate share links |
pipe |
Upload from stdin |
completions |
Generate shell completion scripts |
| Command | Description |
|---|---|
version |
Manage bucket versioning |
tag |
Manage object tags |
rc ls local/bucket [2024年01月15日 10:30:00] 0B dir/ [2024年01月15日 10:30:00] 1.2MiB file.txt
rc ls local/bucket --json
{
"items": [
{"key": "dir/", "is_dir": true},
{"key": "file.txt", "size_bytes": 1258291, "size_human": "1.2 MiB", "is_dir": false}
],
"truncated": false
}Generate and install shell completion scripts:
rc completions bash > ~/.bash_completion.d/rc # Or add to .bashrc: # source <(rc completions bash)
rc completions zsh > ~/.zfunc/_rc # Ensure ~/.zfunc is in your fpath (add to .zshrc): # fpath=(~/.zfunc $fpath) # autoload -Uz compinit && compinit
rc completions fish > ~/.config/fish/completions/rc.fish
rc completions powershell >> $PROFILE
Configuration file is located at ~/.config/rc/config.toml:
schema_version = 1 [defaults] output = "human" color = "auto" progress = true [[aliases]] name = "local" endpoint = "http://localhost:9000" access_key = "accesskey" secret_key = "secretkey" region = "us-east-1"
| 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) |
| 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 |
- Rust 1.92 or higher (Edition 2024)
cargo build --workspace
# Unit tests cargo test --workspace # Integration tests (requires S3-compatible backend) docker compose -f docker/docker-compose.yml up -d cargo test --workspace --features integration docker compose -f docker/docker-compose.yml down
cargo fmt --all --check cargo clippy --workspace -- -D warnings
Contributions are welcome! Please read AGENTS.md for development guidelines.
This project is dual-licensed under MIT or Apache-2.0. See LICENSE-MIT and LICENSE-APACHE.
- MinIO Client (mc) - Inspiration for CLI design
- aws-sdk-s3 - AWS S3 SDK for Rust