Skip to content
Magnet links to torrent files
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


standard-readme compliant Build Status

M2T (aka Magnet To Torrent) is an utility to convert magnet URI into torrent files. It is meant to be used in combination with rTorrent or any other torrent downloader that support a "watch directory" (a directory that is periodically checked for new torrent files which are then automatically downloaded). rTorrent, µtorrent, Transmission do support this feature, among others (you know more? PR please!)

It is heavily inspired by the bash script on the rTorrent Wiki


Pretty standard procedure

go get
go install


M2T accepts only 2 parameters, -t and w. The former is the type of file to download (preset are music, books, vids and others). This is mostly useful to scripting then with your torrent client saving directories, notification messages etc. according to different types of files. So using M2T like

m2t -t vids $long_magnet_link

will save the resulting torrent files inside the watch directory, in a directory named "vids". That's for movies, tv series, video lessons and any files containing audio+video. It's up to you to classify or not the torrent files according to these types or not. If not inserted, it defaults to others.

With w instead you can choose a different watch directory. Yours will be most definitely different than mine so for frequent use, directly change the constant defWatchdir in the source and build M2T again to save the data.


MIT © Gianluca Fiore. See LICENSE


You can’t perform that action at this time.