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 and UDP to talk to other torrent clients.
NOTE: To connect to "web peers" (browsers) in addition to normal BitTorrent peers, use
webtorrent-hybrid
which includes WebRTC
support for node.
To use WebTorrent in the browser, see webtorrent
.
Features
- Use WebTorrent 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
- peer discovery via dht, tracker, and ut_pex
- protocol extension api for adding new extensions
Install
To install a webtorrent
command line program, run:
npm install webtorrent-cli -g
Usage
$ 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
To download a torrent:
$ webtorrent magnet_uri
To stream a torrent to a device like AirPlay or Chromecast, just pass a flag:
$ 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)
- http/https url to a torrent file (string)
- filesystem path to a torrent file (string)
License
MIT. Copyright (c) Feross Aboukhadijeh and WebTorrent, LLC.