# skynet-cli

> skynet upload command-line executable

Latest version **1.0.1** (published 2020-03-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install skynet-cli
pnpm add skynet-cli
yarn add skynet-cli
bun add skynet-cli
```

Provides the command `skynet-cli`.

## 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.0.1 |
| Published | 2020-03-12 |
| First published | 2020-03-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10.16.3 |
| Dependencies | 9 |
| Unpacked size | 15.8 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 6 |
| Maintainers | vbstreetz |
| Keywords | skynet, cli, sia, upload, file, files, ipfs, decentrallized, storage |

## Links

- npm: https://www.npmjs.com/package/skynet-cli
- Repository: https://github.com/vbstreetz/skynet-cli
- Homepage: https://github.com/vbstreetz/skynet-cli#readme
- Issues: https://github.com/vbstreetz/skynet-cli/issues
- npm.io page: https://npm.io/package/skynet-cli

## Dependencies (9)

- [ansi](https://npm.io/package/ansi.md) ~0.3.0
- [head](https://npm.io/package/head.md) ~1.0.0
- [mime](https://npm.io/package/mime.md) ^1.2.11
- [debug](https://npm.io/package/debug.md) ^4.1.1
- [printf](https://npm.io/package/printf.md) 0.2.2
- [commander](https://npm.io/package/commander.md) 1.3.2
- [superagent](https://npm.io/package/superagent.md) ^5.2.2
- [max-component](https://npm.io/package/max-component.md) ~1.0.0
- [sum-component](https://npm.io/package/sum-component.md) ~0.1.1

## 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.0.1 (latest) — 2020-03-12
- 0.1.0 — 2020-03-01

## README

# Skynet CLI

The `skynet-cli` utility allows you to upload files to the [Sia Skynet](https://siasky.net/) CDN with ease.

![skynet-cli](https://siasky.net/_Axj0jgCo1zLZWZAdzIJpk-bGWkLrUz54hw_-BBt2m5VIQ)

## Installation

Ensure you're using a recent nodejs version, ideally `10.16.3+` and above, and install with npm:

```
$ npm install -g skynet-cli
```

## Usage

```

  Usage: skynet-cli [options] [file ...]

  Options:

    -h, --help            output usage information
    -V, --version         output the version number
    -f, --filename        assign filename to stdin upload
    -p, --portal          upload to a different portal other than https://siasky.net

```

## Examples

Examples illustrating how to use the command-line tool to upload files.

### Uploading single file

```
$ skynet-cli reflection.png

 reflection.png : 92%
```

#### Multiple Files

Upload several files at once by passing multiple filenames:

```
$ skynet-cli simon-*.png

              simon-1.png : https://siasky.net/iqd4NLa13ZV
              simon-2.png : https://siasky.net/iCxBKJZAm36
              simon-3.png : https://siasky.net/iEzTZXvVRYP
              simon-4.png : https://siasky.net/iRYA6bLp70E
              simon-5.png : https://siasky.net/ilMqsXxtTsV
              simon-6.png : https://siasky.net/ilVngVMMeSd
              simon-7.png : https://siasky.net/i1Tx8vkIbCC
              simon-8.png : https://siasky.net/ifUKcaz5I3A
    simon-ball-ocean.png… : https://siasky.net/iCA5N2PCJJS
    simon-ocean-stick-2.… : 71%
    simon-ocean-stick.pn… : 55%
          simon-ocean.png : 74%
```

#### STDIN

When no filenames are given `skynet-cli(1)` reads from **stdin**:

```
$ echo 'hello world' | skynet-cli
```

A filename can be passed to help interpret the content:

```
$ echo 'hello __world__' | skynet-cli --filename hello.md
```

#### Portal

You can opt to use a different portal, other than https://siasky.net, using the `-p, --portal` option:

```
skynet-cli -p https://sialoop.net big-buck-bunny.mp4
```

Here are some examples of known portals:

- https://siasky.net
- https://sialoop.net
- https://skynet.luxor.tech
- https://skynet.tutemwesi.com
- https://siacdn.com
- https://vault.lightspeedhosting.com

## Todos

- [x] Upload single file
- [x] Upload whole directory
- [x] Upload stdin
- [ ] Encrypt with pass
- [ ] Zip & upload directory
- [x] Upload to custom portal

## Attribution

Adapted from [Automattic/cloudup-cli](https://github.com/Automattic/cloudup-cli) for the [Gitcoin Skynet Hackathon Challenge](https://gitcoin.co/issue/NebulousLabs/Skynet-Hive/1/4058)

## Licence

MIT

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