npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

baidubce-cli

v0.0.9

Published

baidu cloud engine command line tools

Downloads

26

Readme

baidubce-cli

Baidu Cloud Engine Node.js Command Line Tools.

Currently support operations on BS, BOS, Media service.

Install

npm i -g baidubce-cli

BOS Usage

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

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.

BS Usage

Configuration

For first time, you should config the ak, sk and endpoint.

baidubce bs -c bs.ak my_ak
baidubce bs -c bs.sk my_sk
baidubce bs -c bs.endpoint https://bs.baidu.com

Btw, you can also set specific bucket to a different endpoint which will override the default configuration.

baidubce bs -c bs.my-bucket-1.ak my_ak
baidubce bs -c bs.my-bucket-1.sk my_sk
baidubce bs -c bs.my-bucket-1.endpoint http://10.26.208.32:8998

create a bucket

baidubce bs --create-buckets my-bucket-1 my-bucket-2

list all buckets

baidubce bs --list-buckets

list all objects

baidubce bs --list-objects my-bucket-1
baidubce bs --list-objects my-bucket-1 --start=10 --limit=20

upload a regular file

# Upload hello.js to my-bucket-1 and rename to world.js
baidubce bs --put-object hello.js bs://my-bucket-1/world.js

# Upload hello.js to my-bucket-1 and keep the same file name.
baidubce bs --put-object hello.js bs://my-bucket-1/
baidubce bs --put-object hello.js bs://my-bucket-1

upload a large file

Unimplemented.

Media Usage

Configuration

For first time, you should config the ak, sk and endpoint.

baidubce media -c media.ak my_ak
baidubce media -c media.sk my_sk

# Optional
# baidubce media -c media.endpoint http://10.105.97.15
# baidubce media -c media.region my_region

Create bucket

baidubce bos --create-buckets media-test-in media-test-out

Upload Video

baidubce bos --put-object a.mov bos://media-test-in/a.mov

Or

baidubce bos --put-superfile a.mov bos://media-test-in/a.mov

[===               ] 27%

Create pipeline

baidubce media --create-pipeline \
--pn leeight_test \
--pc '{"capacity": 1}' \
--sb media-test-in \
--tb media-test-out

Create job

baidubce media --create-job --pn leeight_test --rn bce_video_mp4_854x480_800kbps --sk a.mov --tk b.mov

Check job status

baidubce media --get-all-jobs --pn leeight_test

Others

More usages please refer baidubce bos -h or baidubce media -h. Feedback is welcome, feel free to send me an email for any question.