Get a magnet link from a torrent file.
Read more about the magnet URI scheme at the magnet-uri project website.
npm install magnet-link
var magnetLink =
The result is a string that looks like this.
There is also a command-line interface available if you install it with
npm install -g magnet-link
This installs a program called
magnet-link that you simply pass a torrent file or url.
This will print the magnet link to the terminal.
You can also pipe the contents of a torrent file to
cat file.torrent | magnet-linkmagnet-link < file.torrent
This way it can be paired with
create-torrent . | magnet-link
Contributions welcome! Please read the contributing guidelines before getting started.