https://github.com/alex1990/obito
A cli to sync npm package(s) to cloud storage, such as AWS S3, Aliyun OSS.
https://github.com/alex1990/obito
cdn cli npm oss package s3 upload
Last synced: 2 months ago
JSON representation
A cli to sync npm package(s) to cloud storage, such as AWS S3, Aliyun OSS.
- Host: GitHub
- URL: https://github.com/alex1990/obito
- Owner: Alex1990
- License: mit
- Created: 2019-09-04T16:36:41.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T02:08:01.000Z (over 3 years ago)
- Last Synced: 2025-05-16T08:08:21.904Z (about 1 year ago)
- Topics: cdn, cli, npm, oss, package, s3, upload
- Language: JavaScript
- Homepage:
- Size: 1.15 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# obito
obito (`/ˈɔːbitəu/`): A cli to sync npm package(s) to cloud storage, such as Aliyun OSS.
## Installation
```
npm install --global obito
```
**Note: You must use npm >= 6.9.0**
## Usage
Firstly, create a file named `.obitorc` in your $HOME directory or any other directory.
The obito will merged the `.obitorc`s of current working directory (**preferred**) and $HOME direcotry.
**.obitorc**
```ini
# The path prefix
prefix = npm
# ali-oss sdk configuration: https://www.alibabacloud.com/help/zh/doc-detail/32068.htm
[aliyun]
accessKeyId =
accessKeySecret =
bucket =
region =
# or aws s3
[s3]
accessKeyId =
secretAccessKey =
bucket =
region =
```
Then, run the below command to sync the npm package(s) to cloud storage.
```sh
# sync lodash
obito sync lodash
# sync the latest lodash
obito sync lodash@latest
# sync lodash with the specified version
obito sync lodash@4.17.15
# sync multiple packages
obito sync react react-dom
# By default, it will be uploaded to aliyun.
# You can specify the `--uploader` argument
# Currently, the uploader argument can be one of aliyun, s3
obito sync lodash --uploader s3
```
Then, the path uploaded to cloud storage is
```
/npm/lodash@4.17.15/lodash.js
```
## Docs
```
$ obito help
Usage: obito [options] [command]
Options:
-V, --version output the version number
-h, --help output usage information
Commands:
sync [otherPackages...] sync the package(s) to cloud storage
help [cmd] display help for [cmd]
```
```
$ obito help sync
Usage: obito-sync [options]
Options:
-u, --uploader the uploader of cloud storage, one of aliyun, s3 (default: "aliyun")
-h, --help output usage information
```
## LICENSE
MIT