LinuxCommandLibrary

transmission-cli

Download torrents from the command line

TLDR

Download a specific torrent

$ transmission-cli [url|magnet|path/to/file]
copy

Download a torrent to a specific directory
$ transmission-cli [[-w|--download-dir]] [path/to/download_directory] [url|magnet|path/to/file]
copy

Create a torrent file from a specific file or directory
$ transmission-cli --new [path/to/source_file_or_directory]
copy

Specify the download speed limit (in KB/s)
$ transmission-cli [[-d|--downlimit]] [50] [url|magnet|path/to/file]
copy

Specify the upload speed limit (in KB/s)
$ transmission-cli [[-u|--uplimit]] [50] [url|magnet|path/to/file]
copy

Use a specific port for connections
$ transmission-cli [[-p|--port]] [port_number] [url|magnet|path/to/file]
copy

Force encryption for peer connections
$ transmission-cli [[-er|--encryption-required]] [url|magnet|path/to/file]
copy

Use a Bluetack-formatted peer blocklist
$ transmission-cli [[-b|--blocklist]] [blocklist_url|path/to/blocklist] [url|magnet|path/to/file]
copy

SYNOPSIS

transmission-cli [options] <torrent-file|magnet-link>

PARAMETERS

-f <script>
    Execute the specified script when the torrent finishes downloading and seeding. This can be used for automation.

-g <port>
    Set the global peer listening port. This is the TCP port Transmission uses to communicate with other peers on the BitTorrent network.

-m
    Do not seed after the download is complete; exit immediately once the torrent finishes downloading. Useful for one-off downloads.

-u <limit>
    Set the maximum upload speed limit in Kilobytes per second (KB/s). A value of 0 means unlimited upload speed.

-d <limit>
    Set the maximum download speed limit in Kilobytes per second (KB/s). A value of 0 means unlimited download speed.

-w <directory>
    Specify the directory where downloaded files should be saved. If not specified, files are typically saved to the current working directory.

-q
    Enable quiet mode, suppressing most output to the console, showing only critical messages.

-h
    Display a help message detailing available command-line options and then exit.

-v
    Show the version number of transmission-cli and exit.

DESCRIPTION

transmission-cli is the command-line interface for the popular Transmission BitTorrent client. It allows users to download and upload torrents directly from the terminal without requiring a graphical user interface. This makes it ideal for use on servers, headless systems, or in scripts where automated torrent management is needed.

It supports essential BitTorrent features like magnet links, DHT, and peer exchange. Users can specify download directories, set bandwidth limits for both upload and download, and configure scripts to run upon torrent completion. Unlike the daemonized versions, transmission-cli typically runs for a single torrent and exits when the download is complete or after a period of seeding, making it perfect for one-off torrent operations.

CAVEATS

transmission-cli is designed for single-torrent operations. It does not run as a persistent background service like transmission-daemon, nor does it manage multiple torrents concurrently from a single invocation. For continuous torrent management or handling many torrents, transmission-daemon paired with transmission-remote is the more appropriate solution.

USAGE WITH MAGNET LINKS

transmission-cli can directly accept magnet URIs as arguments, removing the need to first download a .torrent file. Simply pass the magnet link string after the command, for example: transmission-cli "magnet:?xt=urn:btih:hash...". Ensure the magnet link is properly quoted.

AUTOMATED DOWNLOAD & EXIT

For scenarios where you only want to download a file and then stop immediately without seeding, utilize the -m option. This ensures the command exits gracefully upon download completion, which is particularly useful in automated scripts or for one-time downloads where continuous sharing is not required.

HISTORY

transmission-cli is an integral part of the Transmission BitTorrent client project, which began development around 2005. It provides the foundational command-line interface, offering a simple and efficient way to interact with the BitTorrent network directly from the terminal. Its design emphasizes low resource consumption and ease of use in scripted or headless environments, contributing to Transmission's reputation as a lightweight and user-friendly client.

SEE ALSO

Copied to clipboard