Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/webtorrent/webtorrent-cli
WebTorrent, the streaming torrent client. For the command line.
https://github.com/webtorrent/webtorrent-cli
bittorrent cli javascript nodejs p2p streaming webrtc webtorrent
Last synced: 2 days ago
JSON representation
WebTorrent, the streaming torrent client. For the command line.
- Host: GitHub
- URL: https://github.com/webtorrent/webtorrent-cli
- Owner: webtorrent
- License: mit
- Created: 2016-03-11T05:49:36.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-10-26T19:57:38.000Z (about 2 months ago)
- Last Synced: 2024-10-29T14:56:24.167Z (about 1 month ago)
- Topics: bittorrent, cli, javascript, nodejs, p2p, streaming, webrtc, webtorrent
- Language: JavaScript
- Homepage: https://webtorrent.io
- Size: 489 KB
- Stars: 1,170
- Watchers: 21
- Forks: 135
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Authors: AUTHORS.md
Awesome Lists containing this project
- awesome-peer-to-peer - webtorrent-cli
- awesome-repositories - webtorrent/webtorrent-cli - WebTorrent, the streaming torrent client. For the command line. (JavaScript)
README
WebTorrent CLI
The streaming torrent client. For the command line.
**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, UDP and WebRTC to talk to other torrent clients.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**
- 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
- Check all the **[supported BEPs here](https://github.com/webtorrent/webtorrent/blob/master/docs/bep_support.md)**### Install
To install a `webtorrent` command line program, run:
```bash
npm install webtorrent-cli -g
```### Usage
```bash
$ webtorrent --help
_ _ _
__ _____| |__ | |_ ___ _ __ _ __ ___ _ __ | |_
\ \ /\ / / _ \ '_ \| __/ _ \| '__| '__/ _ \ '_ \| __|
\ V V / __/ |_) | || (_) | | | | | __/ | | | |_
\_/\_/ \___|_.__/ \__\___/|_| |_| \___|_| |_|\__|Usage:
webtorrent [command] [options]Examples:
webtorrent download "magnet:..." --vlc
webtorrent "magnet:..." --vlc --player-args="--video-on-top --repeat"Default output location:
* when streaming: Temp folder
* when downloading: Current directorySpecify as one of:
* magnet uri
* http url to .torrent file
* filesystem path to .torrent file
* info hash (hex string)Commands:
webtorrent download [torrent-ids...] Download a torrent [default]
webtorrent downloadmeta Download metadata of torrent
webtorrent seed Seed a file or a folder
webtorrent create Create a .torrent file
webtorrent info Show torrent information
webtorrent version Show version information
webtorrent help Show help informationOptions (streaming):
--airplay Apple TV [boolean]
--chromecast Google Chromecast [default: all]
--dlna DLNA [boolean]
--mplayer MPlayer [boolean]
--mpv MPV [boolean]
--omx OMX [default: hdmi]
--vlc VLC [boolean]
--iina IINA [boolean]
--smplayer SMPlayer [boolean]
--xbmc XBMC [boolean]
--stdout Standard out (implies --quiet) [boolean]Options (simple):
-o, --out Set download destination [string]
-s, --select Select specific file in torrent [default: List files]
-i, --interactive-select Interactively select specific file in torrent [boolean]
-t, --subtitles Load subtitles file [string]
-h, --help Show help information [boolean]
-v, --version Show version information [boolean]Options (advanced)
-p, --port Change the http server port [number] [default: 8000]
-b, --blocklist Load blocklist file/url [string]
-a, --announce Tracker URL to announce to [string]
-q, --quiet Don't show UI on stdout [boolean]
-d, --download-limit Maximum download speed in kb/s [number] [default: unlimited]
-u, --upload-limit Maximum upload speed in kb/s [number] [default: unlimited]
--pip Enter Picture-in-Picture if supported by the player [boolean]
--verbose Show torrent protocol details [boolean]
--playlist Open files in a playlist if supported by the player [boolean]
--player-args Add player specific arguments (see example) [string]
--torrent-port Change the torrent seeding port [number] [default: random]
--dht-port Change the dht port [number] [default: random]
--not-on-top Don't set "always on top" option in player [boolean]
--keep-seeding Don't quit when done downloading [boolean]
--no-quit Don't quit when player exits [boolean]
--on-done Run script after torrent download is done [string]
--on-exit Run script before program exit [string]
```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).