baidubce-cli
Baidu Cloud Engine Node.js Command Line Tools.
Currently only support operations on BOS service.
Install
npm i -g baidubce-cli
Configuration
For first time, you should config the ak
, sk
and endpoint
.
baidubce bos -c bos.ak my_ak
baidubce bos -c bos.sk my_sk
baidubce bos -c bos.endpoint http://10.105.97.15
Btw, you can also set specific bucket
to a different endpoint
which will override the default configuration.
baidubce bos -c bos.my-bucket-1.ak my_ak
baidubce bos -c bos.my-bucket-1.sk my_sk
baidubce bos -c bos.my-bucket-1.endpoint http://10.26.208.32:8998
Usage
create a bucket
baidubce bos --create-buckets my-bucket-1 my-bucket-2
list all buckets
baidubce bos --list-buckets
upload a regular file
# Upload hello.js to my-bucket-1 and rename to world.js
baidubce bos --put-object hello.js bos://my-bucket-1/world.js
# Upload hello.js to my-bucket-1 and keep the same file name.
baidubce bos --put-object hello.js bos://my-bucket-1/
baidubce bos --put-object hello.js bos://my-bucket-1
upload a large file
baidubce bos --put-superfile cute-kitty.avi bos://my-bucket-1/
[=== ] 27%
Btw, upload a large file you'll get a progress bar notification.
Others
More usages please refer baidubce bos -h
. Feedback is welcome, feel free to send me an email for any question.