Crates.io | scost |
lib.rs | scost |
version | 0.1.0 |
created_at | 2025-03-01 10:13:50.209205+00 |
updated_at | 2025-03-01 10:13:50.209205+00 |
description | A simple command line tool to manage objects with same names across multiple buckets (for Tencent Cloud COS only). |
homepage | |
repository | https://github.com/RinChanNOWWW/scost |
max_upload_size | |
id | 1573660 |
size | 102,244 |
A simple command line tool to manage objects with same names across multiple buckets (for Tencent Cloud COS only).
Run
scost # (default: -c $HOME/.scost.toml)
or
scost -c config.toml
into an interactive shell.
cp <from_bucket> [<to_bucket>|*] <path>
. Copy an existing object from one bucket to another bucket (or all buckets).ls [<bucket>|*] <path>
. List objects under a path in a bucket (or all buckets).rm [<bucket>|*] <path>
. Remove an object from a bucket (or all buckets).sign [<bucket>|*] <path>
. Sign a url for an object in a bucket (or all buckets).P.S. '*' represents all buckets.
Just put your authentication information (secret id and secret key) and used buckets in an toml file.
An example is in config/config.toml:
[auth]
secret_id = "secret id"
secret_key = "secret key"
[[buckets]]
alias = "b1"
bucket = "bucket1"
region = "ap-shanghai"
[[buckets]]
alias = "b2"
bucket = "bucket2"
region = "ap-beijing"
cp
supports copying a directory recursively.