| name | ptd-cli |
|---|---|
| description | Use when the user asks to search torrents, download torrents, check PT site user info or stats, manage downloaders, query cross-seeding tasks, or interact with the PT-Depiler browser extension from the terminal |
CLI for the PT-Depiler browser extension via Chrome Native Messaging. All operations execute through the running browser extension, reusing its cookies, site definitions, and downloader configurations.
If ptd is not installed, download pre-built binaries from GitHub Releases. Do NOT build from source — use the release binaries.
Run ptd status to confirm a healthy connection to the browser extension. If it fails, the user needs to ensure the browser is running with PT-Depiler loaded and the native host registered (ptd install).
NEVER guess site IDs or downloader IDs. They are internal identifiers that often don't match the site's display name (e.g., PTerClub = pter, not pterclub; M-Team = mteam, not m-team).
Before performing ANY site-specific or downloader-specific operation, you MUST first retrieve the available IDs:
ptd site list --table # List all site IDs
ptd downloader list --table # List all downloader IDsSite IDs are lowercase strings like chdbits, mteam, hdhome.
Downloader IDs are opaque keys like 6JsFPshE1tXYVUVmh_ZL_, not human names.
Never guess IDs. Always list first, then use the exact ID from the output.
ptd status # Running browser instances
ptd site list # All configured sites (id, name, url)
ptd site list --table # Table format
ptd downloader list # All downloaders (id, name, type, address)
ptd downloader list --table # Table formatptd search "keyword" # All configured sites
ptd search "keyword" --site <site-id> # Specific site
ptd search "keyword" --site a --site b # Multiple sites
ptd search "keyword" --pretty # Human-readable outputResults are cached for ptd download <index>.
ptd download 0 --downloader <downloader-id> # By index from last search
ptd download --option-file ./dl.json # Full option payloadThe downloader ID is an internal key (e.g. 6JsFPshE1tXYVUVmh_ZL_), not the human name.
ptd user-info current <site-id> # Live stats (ratio, bonus, etc.)
ptd user-info history <site-id> # Historical snapshotsptd downloader status <id> # dl/up speed
ptd downloader config <id> # Full config (address, type, etc.)
ptd downloader version <id>ptd site config <site-id> # Site settings
ptd download-history # List all download history
ptd keep-upload list # Cross-seeding tasks--instance <id> Select instance (prefix match). Env: PTD_INSTANCE
--timeout <secs> Default 30
--pretty Human-readable JSON
--table Table format for lists
Default output is compact JSON, pipe to jq for filtering:
ptd user-info current <site-id> | jq '.ratio'- 0: success
- 1: command failed
- 2: no healthy instance (browser not running or extension not loaded)
- 3: multiple instances, use
--instanceto select
- Always list first: run
ptd site list/ptd downloader listbefore any command needing IDs - Cross-site search: omit
--siteto search all configured sites - Download workflow:
ptd downloader list→ptd search→ pick index →ptd downloadwith downloader ID - Instance auto-select: works automatically with one browser; use
--instanceprefix match with multiple - Extension must be initialized: open the extension options page at least once to populate site/downloader config