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
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?
@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 https://www.npmjs.org/doc/files/package.json.html#bin
Would be awesome if you sent in a PR!
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.
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.
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.
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.