# webtorrent-hybrid-cli

> WebTorrent Hybrid, the streaming torrent client. For the command line.

Latest version **1.3.1** (published 2020-02-02) · MIT license · 0 weekly downloads

## Install

```sh
npm install webtorrent-hybrid-cli
pnpm add webtorrent-hybrid-cli
yarn add webtorrent-hybrid-cli
bun add webtorrent-hybrid-cli
```

Provides the command `webtorrent`.

## 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.3.1 |
| Published | 2020-02-02 |
| First published | 2020-02-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 19 |
| Unpacked size | 33.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | WebTorrent, LLC |
| Maintainers | jleelove |
| Keywords | bittorrent, bittorrent client, download, mad science, streaming, torrent, webrtc, webrtc data, webtorrent-hybrid |

## Links

- npm: https://www.npmjs.com/package/webtorrent-hybrid-cli
- Repository: https://github.com/webtorrent/webtorrent-cli
- Homepage: https://webtorrent.io
- Issues: https://github.com/webtorrent/webtorrent-cli/issues
- npm.io page: https://npm.io/package/webtorrent-hybrid-cli

## Dependencies (19)

- [mime](https://npm.io/package/mime.md) ^2.1.0
- [open](https://npm.io/package/open.md) ^7.0.0
- [clivas](https://npm.io/package/clivas.md) ^0.2.0
- [moment](https://npm.io/package/moment.md) ^2.12.0
- [winreg](https://npm.io/package/winreg.md) ^1.0.1
- [nodebmc](https://npm.io/package/nodebmc.md) 0.0.7
- [ecstatic](https://npm.io/package/ecstatic.md) ^4.0.0
- [minimist](https://npm.io/package/minimist.md) ^1.2.0
- [dlnacasts](https://npm.io/package/dlnacasts.md) ^0.1.0
- [airplay-js](https://npm.io/package/airplay-js.md) ^0.3.0
- [executable](https://npm.io/package/executable.md) ^4.0.0
- [chromecasts](https://npm.io/package/chromecasts.md) ^1.5.3
- [common-tags](https://npm.io/package/common-tags.md) ^1.8.0
- [vlc-command](https://npm.io/package/vlc-command.md) ^1.0.0
- [parse-torrent](https://npm.io/package/parse-torrent.md) ^7.0.0
- [create-torrent](https://npm.io/package/create-torrent.md) ^4.2.1
- [prettier-bytes](https://npm.io/package/prettier-bytes.md) ^1.0.3
- [network-address](https://npm.io/package/network-address.md) ^1.1.0
- [webtorrent-hybrid](https://npm.io/package/webtorrent-hybrid.md) >=0.107.6

## Alternatives

- [byte-size](https://npm.io/package/byte-size.md) — 2.1M weekly downloads
- [speed-limiter](https://npm.io/package/speed-limiter.md) — 16.0K weekly downloads
- [@powersync/node](https://npm.io/package/@powersync/node.md) — 10.9K weekly downloads
- [@ledgerhq/coin-cardano](https://npm.io/package/@ledgerhq/coin-cardano.md) — 1.0K weekly downloads
- [@jayesol/jayeson.lib.streamfinder](https://npm.io/package/@jayesol/jayeson.lib.streamfinder.md) — 1.0K weekly downloads

## Recent versions

- 1.3.1 (latest) — 2020-02-02
- 1.2.1 — 2020-02-02
- 1.0.1 — 2020-02-02

## README

<h1 align="center">
  <br>
  <a href="https://webtorrent.io"><img src="https://webtorrent.io/img/WebTorrent.png" alt="WebTorrent" width="200"></a>
  <br>
  WebTorrent CLI
  <br>
  <br>
</h1>

<h4 align="center">The streaming torrent client. For the command line.</h4>

<p align="center">
    <a href="https://travis-ci.org/webtorrent/webtorrent-cli"><img src="https://img.shields.io/travis/webtorrent/webtorrent-cli/master.svg" alt="travis"></a>
    <a href="https://npmjs.com/package/webtorrent-cli"><img src="https://img.shields.io/npm/v/webtorrent-cli.svg" alt="npm version"></a>
    <a href="https://npmjs.org/package/webtorrent-cli"><img src="https://img.shields.io/npm/dm/webtorrent-cli.svg" alt="npm downloads"></a>
    <a href="https://standardjs.com"><img src="https://img.shields.io/badge/code_style-standard-brightgreen.svg" alt="javascript style guide"></a>
</p>
<br>

**WebTorrent** is the first BitTorrent client that works in the **browser**, but `webtorrent-cli`,
i.e. *THIS PACKAGE*, is for using WebTorrent from the **command line**.

`webtorrent-cli` is a simple torrent client for use in node.js, as a command line app. It
uses TCP and UDP to talk to other torrent clients.

**NOTE**: To connect to "web peers" (browsers) in addition to normal BitTorrent peers, use
[`webtorrent-hybrid`](https://www.npmjs.com/package/webtorrent-hybrid) which includes WebRTC
support for node.

To use WebTorrent in the browser, see [`webtorrent`](https://www.npmjs.com/package/webtorrent).

### Features

- **Use [WebTorrent](https://webtorrent.io) from the command line!**
- **Insanely fast**
- **Pure Javascript** (no native dependencies)
- Streaming
  - Stream to **AirPlay**, **Chromecast**, **VLC player**, **IINA**, and many other devices/players
  - Fetches pieces from the network on-demand so seeking is supported (even before torrent is finished)
  - Seamlessly switches between sequential and rarest-first piece selection strategy
- Supports advanced torrent client features
  - **magnet uri** support via **[ut_metadata](https://www.npmjs.com/package/ut_metadata)**
  - **peer discovery** via **[dht](https://www.npmjs.com/package/bittorrent-dht)**,
    **[tracker](https://www.npmjs.com/package/bittorrent-tracker)**, and
    **[ut_pex](https://www.npmjs.com/package/ut_pex)**
  - **[protocol extension api](https://www.npmjs.com/package/bittorrent-protocol#extension-api)**
    for adding new extensions

### Install

To install a `webtorrent` command line program, run:

```bash
npm install webtorrent-cli -g
```

### Usage

```bash
$ webtorrent --help
               _     _                            _
 __      _____| |__ | |_ ___  _ __ _ __ ___ _ __ | |_
 \ \ /\ / / _ \ '_ \| __/ _ \| '__| '__/ _ \ '_ \| __|
  \ V  V /  __/ |_) | || (_) | |  | | |  __/ | | | |_
   \_/\_/ \___|_.__/ \__\___/|_|  |_|  \___|_| |_|\__|

Usage:
  webtorrent [command] <torrent-id> <options>

Example:
  webtorrent download "magnet:..." --vlc

Commands:
  download <torrent-id...>  Download a torrent
  downloadmeta <torrent-id...> Download torrent metafile and save it usually from magnet link
  seed <file/folder...>     Seed a file or folder
  create <file/folder>      Create a .torrent file
  info <torrent-id>         Show info for a .torrent file or magnet uri

Specify <torrent-id> as one of:
  * magnet uri
  * http url to .torrent file
  * filesystem path to .torrent file
  * info hash (hex string)

Options (streaming):
  --airplay                 Apple TV
  --chromecast              Chromecast
  --dlna                    DLNA
  --mplayer                 MPlayer
  --mpv                     MPV
  --omx [jack]              omx [default: hdmi]
  --vlc                     VLC
  --iina                    IINA
  --xbmc                    XBMC
  --stdout                  standard out (implies --quiet)

Options (simple):
  -o, --out [path]          set download destination [default: current directory]
  -s, --select [index]      select specific file in torrent (omit index for file list)
  -t, --subtitles [path]    load subtitles file
  -v, --version             print the current version

Options (advanced):
  -p, --port [number]       change the http server port [default: 8000]
  -b, --blocklist [path]    load blocklist file/http url
  -a, --announce [url]      tracker URL to announce to
  -q, --quiet               don't show UI on stdout
  --pip                     enter Picture-in-Picture if supported by the player
  --not-on-top              don't set "always on top" option in player
  --keep-seeding            don't quit when done downloading
  --no-quit                 don't quit when player exits
  --on-done [script]        run script after torrent download is done
  --on-exit [script]        run script before program exit
  --verbose                 show torrent protocol details
```

To download a torrent:

```bash
$ webtorrent magnet_uri
```

To stream a torrent to a device like **AirPlay** or **Chromecast**, just pass a flag:

```bash
$ webtorrent magnet_uri --airplay
```

In addition to magnet uris, webtorrent supports many ways to specify a torrent:

- magnet uri (string)
- torrent file (buffer)
- info hash (hex string or buffer)
- parsed torrent (from [parse-torrent](https://www.npmjs.com/package/parse-torrent))
- http/https url to a torrent file (string)
- filesystem path to a torrent file (string)

### License

MIT. Copyright (c) [Feross Aboukhadijeh](https://feross.org) and [WebTorrent, LLC](https://webtorrent.io).

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