Skip to main content

A Python tool that lets you find and download torrents without leaving your CLI.

Project description

torrra

A Python tool that lets you find and download torrents without leaving your CLI.

PyPI AUR Version GitHub release License GitHub Issues or Pull Requests

demo

Overview

torrra provides a streamlined command-line interface for your torrent needs. It allows you to search for and download torrents, and manage active downloads without leaving your terminal, offering a fast and efficient solution for command-line users.

Table of Contents

Features

  • Integrate with services like Jackett and Prowlarr.
  • Fetch and download magnet links directly, powered by Libtorrent.
  • A responsive download manager built with Textual.
  • Pause and resume torrent downloads using keyboard shortcuts.
  • Operates as both a CLI tool and a full-screen terminal UI.
  • Toggle between dark and light themes.
  • Opt-in caching for blazing fast repeated searches.

Installation

torrra offers several installation methods to suit your environment.

Cross-Platform (recommended)

Using pipx ensures torrra is installed in an isolated environment, preventing conflicts with your system's Python packages.

pipx install torrra

This method supports Linux, macOS, and Windows. libtorrent is installed automatically via pip.

Arch Linux

  1. From AUR (builds from source):
yay -S torrra
  1. From AUR Binary Package (faster installation):
yay -S torrra-bin

torrra-bin includes a precompiled standalone binary for x86_64 Linux, requiring no Python dependencies.

Standalone Binaries (No Python Required)

Download pre-built executables directly from GitHub Releases:

OS File
Linux torrra-vX.Y.Z-linux-x86_64
Windows torrra-vX.Y.Z-windows.exe
macOS torrra-vX.Y.Z-macos-x86_64

On Linux/macOS, ensure the binary is executable: chmod +x torrra-vX.Y.Z-*-x86_64.

Docker

torrra is also available as a Docker image, allowing you to run it in an isolated environment without installing Python dependencies directly on your host system.

The official image is hosted on Docker Hub: stabldev/torrra.

Quick Usage

docker run --rm -it stabldev/torrra:latest jackett --url <url> --api-key <api_key>

Replace jackett with your preferred indexer option. You must mount any required config or download directories if needed.

With Config and Downloads Folder Mounted

docker run --rm -it \
  -v ~/.config/torrra:/root/.config/torrra \
  stabldev/torrra:latest jackett --url <url> --api-key <api_key>

Ensure your config.toml inside ~/.config/torrra is set up correctly.

Image Tags

  • stabldev/torrra:latest - always points to the latest release
  • stabldev/torrra:<version> - for a specific release (e.g., x.y.z)

Local Development

To set up torrra for development:

git clone https://github.com/stabldev/torrra
cd torrra
uv sync # or `pip install -e .`
uv run torrra

Here's an improved version of your Usage section, focusing on clarity, user-friendliness, and a logical flow.

Usage

Specify an indexer and provide its connection details. For instance, to use Jackett:

torrra jackett --url http://localhost:9117 --api-key <your_jackett_api_key>

Replace <your_jackett_api_key> with your actual Jackett API key.

Similarly, for Prowlarr:

torrra prowlarr --url http://localhost:9696 --api-key <your_prowlarr_api_key>

Replace <your_prowlarr_api_key> with your actual Prowlarr API key.

Command-Line Interface (CLI)

torrra offers a comprehensive CLI for managing configurations and launching the application with specific indexers.

Command                Description                                                             
torrra                Displays the help message if no subcommand is provided
torrra --help        Shows the general help message
torrra --version      Displays the current installed version of torrra
torrra config        Accesses the configuration subcommands
torrra jackett        Initializes torrra using Jackett as the torrent indexer
torrra prowlarr      Initializes torrra using Prowlarr as the torrent indexer

torrra config Subcommands

Subcommand              Description                                                           
torrra config get <key> Retrieves the value associated with a specific key
torrra config set <key> <value> Sets a configuration key to a specified value
torrra config list    Lists all currently set configuration values

Indexer Options

Both jackett and prowlarr support:

  • --url (Required): Indexer URL
  • --api-key (Required): Your API key
  • --no-cache: Disable caching
  • --help: Show command help

Text-User Interface (TUI) Controls

Once torrra is running, you'll interact with it through its intuitive TUI. Here are the keyboard controls:

Key      Action                                                                       
Navigate up and down through the list of search results
Tab    Move focus to the next interactive widget
Enter Initiate the download for the currently selected torrent
p      Pause the currently active download
r      Resume a previously paused download
q      Quit torrra

Configuration

torrra's behavior can be customized via a config.toml file located in your OS-specific user config directory:

  • Linux/macOS: ~/.config/torrra/config.toml
  • Windows: %APPDATA%\torrra\config.toml

The actual path is automatically resolved using platformdirs.

Example config.toml:

[general]
download_path = "/home/username/Downloads"   # Default folder for saving torrents
remember_last_path = true                    # Reuse the last used path as default

Managing Your Configuration

Use the built-in torrra config command to manage settings:

torrra config get general.download_path              # Get a specific config value
torrra config set general.remember_last_path false   # Set a key-value pair
torrra config list                                   # List all config settings

Indexer Support

Currently supported:

Planned:

  • Support for custom indexers

Roadmap

Ongoing development focuses on enhancing torrra's capabilities:

  • Jackett integration
  • Prowlarr support
  • Torrent download UI with pause/resume
  • Config file support
  • Standalone binary & AUR packaging
  • Magnet info preview (seeders/leechers before download)
  • Advanced filtering/sorting
  • Nyaa & anime-specific indexers
  • Keyboard shortcuts overlay / help screen

Contributing

torrra is an open-source project, and contributions are highly valued.

  • If you find an issue, please open an issue with detailed steps to reproduce.
  • We welcome new features or indexer integrations. Fork the repository and submit a Pull Request.
  • General feedback and feature requests are always appreciated.

License

MIT License. Copyright (c) stabldev

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

torrra-1.2.0.tar.gz (865.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

torrra-1.2.0-py3-none-any.whl (19.8 kB view details)

Uploaded Python 3

File details

Details for the file torrra-1.2.0.tar.gz.

File metadata

  • Download URL: torrra-1.2.0.tar.gz
  • Upload date:
  • Size: 865.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.3

File hashes

Hashes for torrra-1.2.0.tar.gz
Algorithm Hash digest
SHA256 97eea8ffab397cb7cfd6dc2d321f98bc4dc57db075b665fad7ff78371665654b
MD5 dbfc79f2dfa052019fa3b2a80719060e
BLAKE2b-256 8613c28e6175504d5439a1ceaf05f5645c2d0c155726edbe348a6d30f4d1cb7c

See more details on using hashes here.

File details

Details for the file torrra-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: torrra-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 19.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.3

File hashes

Hashes for torrra-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e636c85eefa9dd7f513aad5d6c1cc77c65659b91db002d9b397693365e8ba12c
MD5 e7b11ec2f2e47a3cc2feb4608608f774
BLAKE2b-256 b08d870c0c1453d1569508c2dc8c7b755aea8a66249a35a6a5d907af4cca48a3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page