Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

webtorrent-cli

Package Overview
Dependencies
Maintainers
9
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webtorrent-cli

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

  • 3.5.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
253
increased by8.12%
Maintainers
9
Weekly downloads
 
Created
Source


WebTorrent
WebTorrent CLI

The streaming torrent client. For the command line.

travis npm version npm downloads javascript style guide


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

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]

Examples:
  webtorrent download "magnet:..." --vlc
  webtorrent "magnet:..." --vlc --player-args="--video-on-top --repeat"

Default output location:
  * when streaming: Temp folder
  * when downloading: Current directory

Specify <torrent-id> 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 <torrent-ids...>  Download metadata of torrent
  webtorrent seed <inputs...>               Seed a file or a folder
  webtorrent create <input>                 Create a .torrent file
  webtorrent info <torrent-id>              Show torrent information
  webtorrent version                        Show version information
  webtorrent help                           Show help information

Options (streaming):
      --airplay     Apple TV
      --chromecast  Google Chromecast                             [default: all]
      --dlna        DNLA
      --mplayer     MPlayer
      --mpv         MPV
      --omx         OMX                                          [default: hdmi]
      --vlc         VLC
      --iina        IINA
      --smplayer    SMPlayer
      --xbmc        XBMC
      --stdout      Standard out (implies --quiet)

Options (simple):
  -o, --out        Set download destination                             [string]
  -s, --select     Select specific file in torrent
  -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                [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
      --pip           Enter Picture-in-Picture if supported by the player
      --verbose       Show torrent protocol details
      --player-args   Add player specific arguments (see example)       [string]
      --torrent-port  Change the torrent seeding port          [default: random]
      --dht-port      Change the dht port                      [default: random]
      --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       Run script after torrent download is done
      --on-exit       Run script before program exit

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.

Keywords

FAQs

Package last updated on 15 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc