Search torrents from multiple websites via the CLI
Project description
Torrent Hound
A terminal-first torrent search CLI. Type a query, get ranked results from multiple trackers in one table, then copy a magnet link or open the torrent page with a single keystroke.
$ torrent-hound ubuntu
PirateBay
┏━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━┳━━━━┳━━━━━━┓
┃ No ┃ Torrent Name ┃ Size ┃ S ┃ L ┃ S/L ┃
┡━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━╇━━━━╇━━━━━━┩
│ 1 │ ubuntu-24.04.1-desktop-amd64.iso │ 5.78 GiB │ 40 │ 2 │ 20.0 │
│ 2 │ Ubuntu 22.04 LTS │ 3.4 GiB │ 32 │ 1 │ 32.0 │
│ … │ │ │ │ │ │
└────┴──────────────────────────────────────────────────────┴───────────┴────┴────┴──────┘
Enter command : c1
Magnet link copied to clipboard!
Sources
| Source | Content | Method |
|---|---|---|
| The Pirate Bay | General | HTML scrape, mirror fallback |
| YTS | Movies | JSON API, mirror fallback |
| EZTV | TV shows | JSON API via IMDB lookup |
All sources are searched in parallel.
Requirements
- Python 3.9+
- Runtime dependencies:
beautifulsoup4,requests,pyperclip,rich,platformdirs,tomli_w,argcomplete
Install
pipx install torrent-hound # recommended — isolated venv, auto-PATH
pip install torrent-hound # or plain pip
Pre-built standalone binaries (no Python required) for Linux / macOS / Windows are on the Releases page.
From source:
git clone https://github.com/baddymaster/torrent-hound.git
cd torrent-hound
pip install -e ".[dev]" # installs deps + pytest + ruff
Shell completion
Torrent Hound uses argcomplete
for tab-completion of top-level flags. To enable, add one line to your
shell config:
bash (~/.bashrc):
eval "$(register-python-argcomplete torrent-hound)"
zsh (~/.zshrc):
autoload -U compinit && compinit
autoload -U bashcompinit && bashcompinit
eval "$(register-python-argcomplete torrent-hound)"
Restart your shell, then torrent-hound --<TAB> cycles through flags.
Note: Completion only works when installed via
pip/pipx. The standalone binary from the GitHub Releases page doesn't expose the Python entry point thatregister-python-argcompletehooks into.
Usage
torrent-hound ubuntu
Results render as a table; enter a command at the prompt.
| Command | Action |
|---|---|
m<n> |
Print the magnet link for result <n> |
c<n> |
Copy the magnet link to clipboard |
cs<n> |
Copy the magnet and open Seedr.cc |
rd<n> |
Debrid via Real-Debrid and dispatch via configured action (requires token) |
d<n> |
Hand the magnet to your default torrent client |
o<n> |
Open the torrent page in your default browser |
p |
Re-print the results table |
s |
Enter a new query and search again |
r |
Repeat the last search (cached sources reused; failed sources retry) |
u |
Show the source URLs used for the current results |
h |
Show the help menu |
q |
Quit |
Scripting mode
torrent-hound --json ubuntu | jq '.tpb.results["0"].magnet'
--json emits a single valid JSON document to stdout and exits.
Development
pip install -e ".[dev]"
pytest tests/
Tests run fully offline — parser fixtures are captured HTML, network calls are mocked.
Real-Debrid integration
Torrent Hound can send a selected torrent to Real-Debrid and hand the resulting direct link to your download manager.
Setup
One-command interactive setup:
torrent-hound --configure-rd
Prompts for your API token (get one at real-debrid.com/apitoken) and the action to run against returned direct links, then writes them to the config file with restrictive permissions.
Alternatively, set RD_TOKEN as an env var for ad-hoc use without saving anything:
export RD_TOKEN="..."
Action modes
| Mode | What happens with the direct link(s) |
|---|---|
clipboard |
(default) Copied to clipboard. Multiple links are joined with newlines. |
print |
Printed to stdout. |
browser |
Opened in your default browser (works without a separate download manager). |
downie |
Sent to Downie 4 via its downie:// URL scheme (macOS). |
Convenience flags
torrent-hound --configure-rd # interactive setup (token + action)
torrent-hound --config-path # print the resolved config file path
torrent-hound --user-status # show RD account info (premium, expiration, points)
torrent-hound --revoke-rd-token # invalidate the current token on RD
Config file
Path: ~/Library/Application Support/torrent-hound/config.toml (macOS) / ~/.config/torrent-hound/config.toml (Linux) / %APPDATA%\torrent-hound\config.toml (Windows). Managed by --configure-rd, but the format is plain TOML if you ever want to edit it directly:
[real_debrid]
token = "XXXXXXXXXXXXXXXXXXXXXXXXXXXX"
action = "downie"
Usage
After a search, type rd<n> (e.g. rd3). The flow submits the torrent to RD, waits for the hoster links, then runs your configured action. Multi-file torrents open an interactive file picker on the first invocation so you can choose exactly what to debrid.
If RD is still processing (common for larger or uncached torrents), you'll see a short "run again in a moment" message — re-running rd<n> picks up where it left off without re-prompting the picker.
Troubleshooting
Real-Debrid rejected the token— runtorrent-hound --configure-rdto enter a fresh one.- Connectivity errors (
DNS lookup failed,block page, geo-block) — your ISP / network / proxy is filtering the RD API. Try a VPN or a DoH resolver (1.1.1.1,8.8.8.8). - Anything else — run
torrent-hound --user-statusto check your account. Specific error messages reference RD's documentederror_codevalues and link to what to do.
Troubleshooting
-
SSL handshake errors: see these Stack Overflow answers for common fixes.
-
[PirateBay] Error : All known mirrors returned no results or were unreachable: every TPB domain in the fallback chain is blocked or down. Add a known-working mirror toTPB_DOMAINSat the top oftorrent-hound.py. -
Blocked by Cloudflare captcha: some sources serve a CF challenge that requires a real browser.
Disclaimer
This software is provided as-is, with no warranty of any kind. It is intended for discovering legally-distributable content and is not intended to be used for downloading, distributing, or facilitating access to copyrighted material without authorisation. You are responsible for complying with the laws of your jurisdiction.
License
AGPL-3.0 — see LICENSE.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file torrent_hound-2.6.0.tar.gz.
File metadata
- Download URL: torrent_hound-2.6.0.tar.gz
- Upload date:
- Size: 85.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f8b9cca3124c446f6374d126a6eaee5118e21659cfed0f8dd5516a4da397333
|
|
| MD5 |
8c6626c9b8a4dc124a1bbe4ef7237300
|
|
| BLAKE2b-256 |
4517b857a3e169587558fee509347039a083c9a7956d90575268416ce9f733c3
|
Provenance
The following attestation bundles were made for torrent_hound-2.6.0.tar.gz:
Publisher:
publish.yml on baddymaster/torrent-hound
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
torrent_hound-2.6.0.tar.gz -
Subject digest:
1f8b9cca3124c446f6374d126a6eaee5118e21659cfed0f8dd5516a4da397333 - Sigstore transparency entry: 1332328447
- Sigstore integration time:
-
Permalink:
baddymaster/torrent-hound@25ef9502f36b87b0023af67664689cd79dc70764 -
Branch / Tag:
refs/tags/v2.6.0 - Owner: https://github.com/baddymaster
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@25ef9502f36b87b0023af67664689cd79dc70764 -
Trigger Event:
push
-
Statement type:
File details
Details for the file torrent_hound-2.6.0-py3-none-any.whl.
File metadata
- Download URL: torrent_hound-2.6.0-py3-none-any.whl
- Upload date:
- Size: 35.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86cfc3b77b80d05736ee134be857bcbbd5f6f7ba565f4b45e13919732a7789ff
|
|
| MD5 |
f124fdb8bb596121a80f3e0319ba155b
|
|
| BLAKE2b-256 |
23a77d0e2d2b3f88f5614b1fcd6b4842b27289edfb9ab8f52277403572f82fe9
|
Provenance
The following attestation bundles were made for torrent_hound-2.6.0-py3-none-any.whl:
Publisher:
publish.yml on baddymaster/torrent-hound
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
torrent_hound-2.6.0-py3-none-any.whl -
Subject digest:
86cfc3b77b80d05736ee134be857bcbbd5f6f7ba565f4b45e13919732a7789ff - Sigstore transparency entry: 1332328567
- Sigstore integration time:
-
Permalink:
baddymaster/torrent-hound@25ef9502f36b87b0023af67664689cd79dc70764 -
Branch / Tag:
refs/tags/v2.6.0 - Owner: https://github.com/baddymaster
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@25ef9502f36b87b0023af67664689cd79dc70764 -
Trigger Event:
push
-
Statement type: