iptorrents-cli
A focused CLI for searching and downloading torrents from IPTorrents.
Designed for agent/LLM use — output defaults to TOON format (token-efficient), with --json as an override.
Example LLM skill: See iptorrents skill for a complete workflow that searches IPTorrents and adds results to Transmission.
Installation
git clone https://github.com/youruser/iptorrents-cli
cd iptorrents-cli
uv tool install .
Authentication
IPTorrents uses Cloudflare Turnstile — automated login is impossible. Auth is done via browser cookies.
1. Extract cookies
Open iptorrents.com, log in, open DevTools (F12) → Application/Storage → Cookies, and copy the values for:
uidpasscf_clearance(Cloudflare token)
Format them as: uid=VALUE; pass=VALUE; cf_clearance=VALUE
2. Save credentials
ipt auth "uid=123456; pass=abc123...; cf_clearance=xyz..."
Credentials are saved to ~/.local/state/iptorrents-cli/auth.toml with chmod 600.
Commands
ipt [--json] COMMAND ...
--json switches all output to pretty-printed JSON. Default is TOON.
ipt auth
Save browser cookies for authentication.
ipt auth "uid=123456; pass=abc...; cf_clearance=xyz..."
# Read from stdin:
echo "uid=123456; pass=abc..." | ipt auth -
ipt search (ipt s)
Search for torrents.
ipt search "blade runner 2049"
ipt s "ubuntu 24.04" --sort seeders --limit 10
ipt search "pink floyd" --json
| Flag | Default | Description |
|---|---|---|
-s / --sort FIELD |
age | seeders leechers size downloads name age |
-n / --limit N |
25 | Max results |
Output fields: id, name, category, size, seeders, leechers, downloads, added, download_url
ipt info (ipt i)
Show full details for a torrent by ID.
ipt info 111222
ipt i 111222 --json
Output fields: id, name, size, file_count, uploaded, uploader, seeders, leechers, genre, plot, actors, imdb_url, tmdb_url, download_url
Movie/TV torrents include genre, plot, actors, imdb_url, tmdb_url. Other categories leave these empty.
ipt download (ipt d)
Download a .torrent file by ID.
# Save to current directory:
ipt download 111222
# Save to a specific directory:
ipt d 111222 --output ~/Downloads
# Stream raw bytes to stdout — pipe directly to transmission-cli:
ipt download --stdout 111222 | transmission-remote --add -
| Flag | Description |
|---|---|
-o / --output DIR |
Directory to save .torrent (default: cwd) |
--stdout |
Write raw bytes to stdout, suppress all other output |
Output formats
TOON (default)
Compact tabular notation — minimal tokens, great for LLM consumption:
[2]{id,name,category,size,seeders,leechers,downloads,added,freeleech,download_url}:
7249322,Blade Runner 2049 2017 Hybrid 1080p UHD BluRay x265,Movie/x265,16.7 GB,23,0,62,1 days ago,true,"https://iptorrents.com/download.php/7249322/..."
7206952,Ubuntu 24.04 LTS Desktop amd64,PC/0day,5.68 GB,503,78,9999,8 weeks ago,false,"https://iptorrents.com/download.php/7206952/..."
JSON
ipt search "hevc remux" --json | jq '.[].seeders'
Auth file
~/.local/state/iptorrents-cli/auth.toml (created by ipt auth, chmod 600):
[auth]
uid = "123456"
pass = "abc123def456..."
cf_clearance = "xyz..." # optional but usually needed
Development
uv sync
uv run pytest tests/ -v
uv run ruff check iptorrents/
Security
- Cookies grant full account access. The auth file is stored
600, the directory700. - Never commit
~/.local/state/iptorrents-cli/auth.toml. - Enabling
requestsdebug logging will print cookie values to stderr.
Metadata
Release files for iptorrents-cli 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| iptorrents_cli-0.1.0.tar.gz | 55.0 kB | Without provenance | Details for iptorrents_cli-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| iptorrents_cli-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for iptorrents_cli-0.1.0-py3-none-any.whl |
Total release size: 71.0 kB
Release files / iptorrents_cli-0.1.0.tar.gz
| Download URL | iptorrents_cli-0.1.0.tar.gz |
|---|---|
| Size | 55.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0a812641b7e6fa3a7cebeb4bb309b80f0c2312bcc7b70359e30f8bec65ad8a43
|
|
BLAKE2b-256 checksum How to use checksums |
a5ae434cffa3180fac965624dd4f7b19f6226fb4edf7dea54a9b6a54042d0456
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / iptorrents_cli-0.1.0-py3-none-any.whl
| Download URL | iptorrents_cli-0.1.0-py3-none-any.whl |
|---|---|
| Size | 16.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aeeef494ad22f50f52046a9d8d038d5204307bfc08130be0ee77d82b1b688f1e
|
|
BLAKE2b-256 checksum How to use checksums |
e3be32ac689616ac1f421bc48533c2642b41b66709517885b53f7dbf70f3f7f2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for iptorrents-cli 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.