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!
Requirements
- Python 3.9+
- Runtime dependencies:
beautifulsoup4,requests,pyperclip,rich
Install
Via pipx (recommended)
pipx installs each Python CLI into its own isolated
venv and automatically puts the entry point on your $PATH.
pipx install torrent-hound
If you don't already have pipx: brew install pipx (macOS), sudo apt install pipx (Ubuntu/Debian), or python3 -m pip install --user pipx && python3 -m pipx ensurepath.
Via pip
pip install torrent-hound
Whether this lands torrent-hound on your $PATH depends on where pip
installed its scripts directory:
- Inside an active venv: always on PATH while the venv is active.
pip install --user(macOS / Linux): scripts go to~/.local/bin. Add it to PATH if missing:
Reload your shell, or runecho 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc # or ~/.bashrcsource ~/.zshrc.pip install --user(Windows): scripts go to%APPDATA%\Python\PythonXX\Scripts. Find the exact path withpython -m site --user-base, then add thatScriptsdirectory to PATH via System Properties → Environment Variables.- System-wide
sudo pip install(Linux/macOS): scripts go to/usr/local/bin, which is almost always on PATH. Modern Python distributions may refuse this install with a PEP 668 "externally-managed-environment" error — prefer pipx or a venv instead.
Upgrade later with pip install -U torrent-hound (or pipx upgrade torrent-hound).
From source
git clone https://github.com/baddymaster/torrent-hound.git
cd torrent-hound
python3 -m venv .venv
source .venv/bin/activate
pip install -e . # installs deps + puts torrent-hound on PATH
For development (adds pytest + ruff):
pip install -e ".[dev]"
Usage
Interactive mode (default)
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 |
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 |
u |
Show the source URLs used for the current results |
h |
Show the help menu |
q |
Quit |
Scripting mode
Non-interactive output, parseable from a pipeline:
# Python-repr output (legacy, --quiet / -q):
torrent-hound -q ubuntu
# JSON output:
torrent-hound --json ubuntu | jq '.tpb.results["0"].magnet'
--json emits a single valid JSON document to stdout and exits.
Development
Running tests
pip install -e ".[dev]"
pytest tests/
The suite runs fully offline (no network calls) — it uses a captured fixture
HTML response for parser tests and mocks requests.get for the fallback-
chain tests.
Project layout
torrent_hound.py # single-file entry point
pyproject.toml # packaging, deps, ruff config, pytest config
tests/ # pytest suite
conftest.py # loads torrent_hound.py as a module
fixtures/ # saved HTML responses for offline parser tests
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 to TPB_DOMAINS at the top of torrent-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.3.0.tar.gz.
File metadata
- Download URL: torrent_hound-2.3.0.tar.gz
- Upload date:
- Size: 23.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
605fee7fe70985e06074a95fc15b13f85d8777aaec60a3ae2a0a7a6880728d7b
|
|
| MD5 |
cb8b41042de6d2caa094e767d0fcce22
|
|
| BLAKE2b-256 |
c4017b63f86e23f5e6946ebed22f5b56f23bc74402a632a905ebda6b311194eb
|
Provenance
The following attestation bundles were made for torrent_hound-2.3.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.3.0.tar.gz -
Subject digest:
605fee7fe70985e06074a95fc15b13f85d8777aaec60a3ae2a0a7a6880728d7b - Sigstore transparency entry: 1313562436
- Sigstore integration time:
-
Permalink:
baddymaster/torrent-hound@8048e472a5e89f9b2c207c80ef4b2dd72f477a26 -
Branch / Tag:
refs/tags/v2.3.0 - Owner: https://github.com/baddymaster
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8048e472a5e89f9b2c207c80ef4b2dd72f477a26 -
Trigger Event:
push
-
Statement type:
File details
Details for the file torrent_hound-2.3.0-py3-none-any.whl.
File metadata
- Download URL: torrent_hound-2.3.0-py3-none-any.whl
- Upload date:
- Size: 21.7 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 |
8038dd77a8092c359f5f18daa1544f0d2460b9808349a9d3e46d9fa6e50478f7
|
|
| MD5 |
a77e23e0f8d13e04a774930829228558
|
|
| BLAKE2b-256 |
1bc6956d3c0f104479049bb11e5c94f0de6e1d7e894aa03a17bdbf7f1c97d0fe
|
Provenance
The following attestation bundles were made for torrent_hound-2.3.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.3.0-py3-none-any.whl -
Subject digest:
8038dd77a8092c359f5f18daa1544f0d2460b9808349a9d3e46d9fa6e50478f7 - Sigstore transparency entry: 1313562493
- Sigstore integration time:
-
Permalink:
baddymaster/torrent-hound@8048e472a5e89f9b2c207c80ef4b2dd72f477a26 -
Branch / Tag:
refs/tags/v2.3.0 - Owner: https://github.com/baddymaster
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8048e472a5e89f9b2c207c80ef4b2dd72f477a26 -
Trigger Event:
push
-
Statement type: