download torrents with node from the CLI
Clone or download
LinusU Merge pull request #52 from amilajack/patch-1
Added travis ci support for modern node versions
Latest commit fe465c8 Jun 4, 2016
Failed to load latest commit information.
.gitignore 1.0.0 May 28, 2014
.travis.yml Update .travis.yml Jun 4, 2016
cli.js adhere to padded-blocks Aug 14, 2015 update collabs Jun 16, 2015
index.js coding style: standard Jun 17, 2015
package.json 2.0.0 Feb 2, 2016 add torrent seed to the usage Mar 27, 2015
screenshot.png screenshot Jun 19, 2014
usage.txt update usage Jun 16, 2015



Download torrents from the command line


torrent <magnet link OR path to .torrent file>

  Download a torrent from a magnet link to torrent file.

torrent create <directory OR file> {-o outfile.torrent}

  Create a torrent file from a directory or file.

  If an output file isn't specified with `-o`, the torrent file will be
  written to stdout.

torrent seed <torrent file>

  Seed a torrent file.

torrent info <torrent file>

  Print information about a .torrent file to stdout as JSON.

torrent ls OPTIONS <torrent file>

  List all the files in a .torrent file.

  OPTIONS are like the `ls` command:

    -s  Show file sizes in bytes alongside file paths.
    -h  Show file sizes in human units when `-s` is on.

download a torrent

e.g. to download ubuntu 14.04 ISO

torrent "magnet:?xt=urn:btih:4d753474429d817b80ff9e0c441ca660ec5d2450&dn=Ubuntu+14.04+64+bit&"

or via .torrent file:

torrent ubuntu-14.04.iso.torrent

it will print progress:

$ torrent ubuntu-14.04.iso.torrent
1 file(s) in torrent
Connected to 35/37 peers
Downloaded 5.47 MB (1.09 MB/s) with 0 hotswaps
Uploaded 0 B (0 B/s)

create a torrent

You can create a torrent file with torrent create:

mkdir xyz; echo beep > xyz/a.txt; echo boop > xyz/b.txt
torrent create xyz/ -o xyz.torrent