# ossr

> The ali-oss cli

Latest version **1.1.5** (published 2021-03-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install ossr
pnpm add ossr
yarn add ossr
bun add ossr
```

Provides the command `ossr`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.5 |
| Published | 2021-03-15 |
| First published | 2019-05-07 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8.0 |
| Dependencies | 10 |
| Unpacked size | 78.8 KB |
| Known vulnerabilities | 0 (+2 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | ~myxvisual |
| Keywords | oss, cli, file, aliyun, ali-oss |

## Links

- npm: https://www.npmjs.com/package/ossr
- Repository: https://github.com/myxvisual/ossr
- Issues: https://github.com/myxvisual/ossr/issues
- npm.io page: https://npm.io/package/ossr

## Dependencies (10)

- [chalk](https://npm.io/package/chalk.md) ^2.4.2
- [qiniu](https://npm.io/package/qiniu.md) ^7.2.1
- [ali-oss](https://npm.io/package/ali-oss.md) ^6.13.2
- [request](https://npm.io/package/request.md) ^2.88.0
- [enquirer](https://npm.io/package/enquirer.md) ^2.3.0
- [commander](https://npm.io/package/commander.md) ^2.20.0
- [es6-promise](https://npm.io/package/es6-promise.md) ^4.2.6
- [terminal-kit](https://npm.io/package/terminal-kit.md) ^1.28.0
- [agentkeepalive](https://npm.io/package/agentkeepalive.md) ^4.0.2
- [cos-nodejs-sdk-v5](https://npm.io/package/cos-nodejs-sdk-v5.md) ^2.5.9

## Alternatives

- [unionfs](https://npm.io/package/unionfs.md) — 2.2M weekly downloads
- [path-starts-with](https://npm.io/package/path-starts-with.md) — 35.9K weekly downloads
- [redzip](https://npm.io/package/redzip.md) — 1.2K weekly downloads
- [vscode-anymatch](https://npm.io/package/vscode-anymatch.md) — 848 weekly downloads
- [@ledgerhq/coin-filecoin](https://npm.io/package/@ledgerhq/coin-filecoin.md) — 793 weekly downloads

## Recent versions

- 1.1.5 (latest) — 2021-03-15
- 1.1.4 — 2021-03-14
- 1.1.3 — 2021-03-14
- 1.1.2 — 2021-03-14
- 1.1.1 — 2021-03-13
- 1.1.0 — 2021-03-13
- 1.0.9 — 2019-05-14
- 1.0.8 — 2019-05-10
- 1.0.7 — 2019-05-09
- 1.0.6 — 2019-05-08
- 1.0.5 — 2019-05-08
- 1.0.4 — 2019-05-08
- 1.0.3 — 2019-05-08
- 1.0.2 — 2019-05-07
- 1.0.1 — 2019-05-07

## README

# OSSR
[![npm package](https://img.shields.io/npm/v/ossr.svg?style=flat-square)](https://www.npmjs.org/package/ossr)
[![PeerDependencies](https://img.shields.io/david/peer/myxvisual/ossr.svg?style=flat-square)](https://david-dm.org/myxvisual/ossr#info=peerDependencies&view=list)
[![Dependencies](https://img.shields.io/david/myxvisual/ossr.svg?style=flat-square)](https://david-dm.org/myxvisual/ossr)
[![DevDependencies](https://img.shields.io/david/dev/myxvisual/ossr.svg?style=flat-square)](https://david-dm.org/myxvisual/react-uwp#info=devDependencies&view=list)
## Inistall
`npm i -g  ossr`

## Config

**Simplify**

`ossr -i <accessKeyId> -s <accessKeySecret> -b <bucket>`

**Advance**

`ossr -i <accessKeyId> -s <accessKeySecret> -b <bucket> -e <endpoint> -r <region> -t <timeout>`

## CLI Usage
### Graph
`ossr`
`ossr -l`
`ossr -l folder/`
![list](https://raw.githubusercontent.com/myxvisual/ossr/master/images//list.gif)

### Upload

#### Upload file to root pat
`ossr ./localFile.jpg` ------> `https://xxxx/localFile.jpg`

#### Upload folder to root path
`ossr ./localFolder` ------> `https://xxxx/onlineFolder/<localFolder**>`

#### Upload file with rename
`ossr ./localFile.jpg customFolder/renamedFile.jpg` ------> `https://xxxx/customFolder/renamedFile.jpg`

#### Upload folder with rename
`ossr ./localFolder onlineFolder/` ------> `https://xxxx/onlineFolder/<localFolder**>`
![upload](https://raw.githubusercontent.com/myxvisual/ossr/master/images//upload.gif)

#### Delete
`ossr -d remoteFileOrFolder`
![delete](https://raw.githubusercontent.com/myxvisual/ossr/master/images//delete.gif)

### Help
`ossr -h`

## Module Usage
``` js
import * as ossr from "../bin/ossr";

async function test() {
    // ossr.setConfig({
    //     accessKeyId: "",
    //     accessKeySecret: ""
    // });

    let existRes = false;
    const uploadRes = await ossr.ossUpload("../bin", "ossr/");
    // console.log(uploadRes);
    existRes = await ossr.ossIsExist("ossr/ossr.js");
    // console.log(existRes);
    const deleteRes = await ossr.ossDelete("ossr/");
    // console.log("deleteRes", deleteRes);
}

test()
```

---
_Source: https://npm.io/package/ossr · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
