nos-cli
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

nos CLI

About

nos CLI 实现了 NOS 查看和上传功能。 能方便快速的查看指定桶的文件列表。能够单上传文件和批量上传整个目录文件,并且不会破坏文件路径。可以通过配置文件配置环境变量路径前缀,实现文件的环境划分。

Install

npm i nos-cli -g

Usage

nos -h

Usage: nos [options]

-c and -b is required everytime

Options:
  -V, --version               output the version number
  -c, --config <config_path>  nos config path
  -b, --bucket <bucket_name>  nos bucket name
  -l, --list [path_pattern]>  show directory
  -u, --upload <file_path>    upload file
  -e, --env <env>             key `prefixPath` from config file
  -n, --normal                disable md5
  -h, --help                  output usage information

Config File

{
  "accessKey": "your accessKey",
  "accessSecret": "your accessSecret",
  "endpoint": "your endpoint",
  "pathPrefix" : {
    "qa": "myqa/test",
    "dev": "mydev/test"
  }
}

Example

show root directory

nos -c [myConfiPath] -b [bucketName] -l

show directory by prefix

nos -c [myConfiPath] -b [bucketName] -l [prefix]

upload file

nos -c [myConfiPath] -b [bucketName] -u [filePath]

batch upload (and set env)

nos -c [myConfiPath] -b [bucketName] -u [dir] -e [prefixPathKey: qa|dev|...]

Readme

Keywords

none

Package Sidebar

Install

npm i nos-cli

Weekly Downloads

0

Version

0.2.1

License

MIT

Unpacked Size

29.3 kB

Total Files

21

Last publish

Collaborators

  • yliiii