npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

webtorrent-hybrid-cli

v1.3.1

Published

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

Downloads

10

Readme

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>

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:

$ 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.