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.
  • 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.

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

Replace --jackett with your preferred provider flag. You can also pass URL and API key directly: --jackett http://localhost:9117 your_api_key. 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 \
  -v ~/Downloads:/downloads \
  stabldev/torrra:latest --jackett

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](https://github.com/stabldev/torrra)
cd torrra
uv sync # or `pip install -e .`
uv run torrra

Usage

To start torrra, you must specify a provider. For example, to use Jackett:

torrra --jackett

Or pass your own Jackett URL and API key directly:

torrra --jackett http://localhost:9117 your_api_key

Omitting a provider flag will result in an error.

CLI Commands & Flags

Top-level commands

Command Description
torrra Launches the interactive TUI
torrra config Manages configuration settings
torrra --help Displays help for the top-level CLI commands

Provider flags (used with torrra)

Flag Description
-j, --jackett Uses Jackett as the torrent indexer. Optionally accepts URL and API_KEY.
-v, --version Shows the current torrra version
-h, --help Displays help for the main application

TUI Controls

Key Action
↑↓ Navigate through results
Tab Focus the next widget
Enter Start download for selection
p Pause the current download
r Resume a 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 -g general.download_path             # Get a specific config value
torrra config -s general.remember_last_path False  # Set a key-value pair
torrra config -l                                   # List all config settings

Config Options

Flag Description
-g, --get KEY Retrieves a config value (e.g., general.download_path)
-s, --set KEY VALUE Sets a key-value pair
-l, --list Lists all configuration settings
-h, --help Displays help for the config command

Indexer Support

Currently supported:

Planned:

Roadmap

Ongoing development focuses on enhancing torrra's capabilities:

  • Jackett integration
  • Torrent download UI with pause/resume
  • Config file support
  • Standalone binary & AUR packaging
  • Magnet info preview (seeders/leechers before download)
  • Prowlarr support
  • 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.0.6.tar.gz (863.7 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.0.6-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for torrra-1.0.6.tar.gz
Algorithm Hash digest
SHA256 e7237bd29fbef3a6dda9b60b10841a6c7f2d19222eda8e199a3a6983c923e4dd
MD5 fad1f08ee827ba0be8917a275f50946d
BLAKE2b-256 143b88d832554fafb0469dc68c4fcb75892ffb1baba548aaaaef4c87fcf03e07

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for torrra-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 16d811cf9dfd381d491b9a069f332e076820938379545448ed788cbb94d7de13
MD5 f83904395921338678b5744194b71409
BLAKE2b-256 06c73ad3138385b53beb905e2edc935b63c4832eb4005984eebb74132a12b78d

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