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 ak my_ak
baidubce bos -c sk my_sk
baidubce bos -c endpoint http://10.105.97.15
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/
Others
More usages please refer baidubce bos -h
. Feedback is welcome, feel free to send me an email for any question.