Add `webtorrent` command line executable #28

feross opened this Issue Feb 24, 2014 · 8 comments


3 participants

feross commented Feb 24, 2014

Since we're using browserify and we've used the node fs, dgram and net apis with browser-specific shims, webtorrent works in node out-of-the-box. Specifically, the bittorrent client works in node. The webtorrent client will take a bit more work.

We should add an executable so users can do:

$ npm install -g webtorrent
$ webtorrent /path/to/torrent


$ webtorrent magnet:?xt=urn:btih:d2474e86c95b19b8bcfdb92bc12c9d44667cfa36&dn=Leaves+of+Grass+by+Walt+Whitman.epub

@feross feross added the enhancement label Feb 24, 2014

What directory of the project do you want the command-line executable in?

Also, do you want the command to add the torrent and launch the normal GUI or be fully command line?


feross commented Mar 5, 2014

@wtfaremyinitials are you implementing this? sweet!

In node, usually this type of thing would go in a bin folder in the root. bin/cmd.js or something like that. Then you add an entry to package.json to declare it. See

Would be awesome if you sent in a PR!


feross commented Mar 5, 2014

Fully command-line, ideally. The normal GUI will assume Chrome is installed and that's not necessarily true. Plus launching Chrome is super heavyweight. Showing the progress in the terminal would be cool.

shavyg2 commented May 5, 2014

is this being worked on ?

I've been super busy with school stuff lately. If nobody else wants to do it, I might be able to find some time to do it in the next week.


feross commented May 7, 2014

There's actually already a command line client in this repo. It's just a front-end to bittorrent-client, plus an http server. It's almost working, but bittorrent-client needs a bit more work first.


feross commented May 18, 2014

WebTorrent is now usable as a command-line program, installable via npm. Give it a shot!

$ npm install webtorrent -g
$ webtorrent --help

Closing this issue now.

@feross feross closed this May 18, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment