byr-pt-cli 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,64 @@
1
+ # byr-pt-cli
2
+
3
+ `byr-cli` is a standalone CLI package with OpenClaw-friendly JSON output contracts.
4
+
5
+ ## Commands
6
+
7
+ ```bash
8
+ export BYR_COOKIE='uid=...; pass=...'
9
+ # or: export BYR_USERNAME='...' BYR_PASSWORD='...'
10
+
11
+ byr search --query "ubuntu" --limit 5 --category movie --spstate free
12
+ byr search --imdb tt0133093 --json
13
+ byr get --id 1001
14
+ byr download --id 1001 --output ./1001.torrent --dry-run
15
+ byr user info --json
16
+ byr meta categories --json
17
+ byr meta levels --json
18
+ byr auth status --verify --json
19
+ byr auth import-cookie --from-browser chrome --profile "Default" --json
20
+ byr auth logout --json
21
+ ```
22
+
23
+ `auth import-cookie` accepts both cookie formats:
24
+
25
+ - legacy: `uid=...; pass=...`
26
+ - current BYR session: `session_id=...; auth_token=...` (optional `refresh_token=...`)
27
+
28
+ Search flags (new):
29
+
30
+ - `--category` (repeatable and comma-separated, accepts aliases/id)
31
+ - `--incldead` (`all|alive|dead` or `0|1|2`)
32
+ - `--spstate` (`all|normal|free|2x|2xfree|50|2x50|30` or `0..7`)
33
+ - `--bookmarked` (`all|only|unbookmarked` or `0|1|2`)
34
+ - `--imdb` (alternative to `--query`)
35
+ - `--page`
36
+
37
+ Auth/config priority:
38
+
39
+ - `CLI flags > ENV > ./.byrrc.json > ~/.config/byr-cli/config.json > ~/.config/byr-cli/auth.json`
40
+
41
+ ## JSON contract
42
+
43
+ Every command supports `--json`.
44
+
45
+ - success: `{ "ok": true, "data": ..., "meta": ... }`
46
+ - error: `{ "ok": false, "error": { "code": "...", "message": "...", "details": ... } }`
47
+
48
+ ## Local live smoke
49
+
50
+ ```bash
51
+ BYR_LIVE=1 BYR_COOKIE='uid=...; pass=...' pnpm --filter byr-pt-cli test:live
52
+ ```
53
+
54
+ Live smoke flow: `search -> get -> download --dry-run -> user info`.
55
+ CI should keep `test:live` disabled and only run fixture/mock tests.
56
+
57
+ ## Skill bundle
58
+
59
+ OpenClaw runtime skill is in `skill-openclaw/` and can be published to ClawHub.
60
+
61
+ ```bash
62
+ # Reads publish settings from skill-openclaw/publish.json
63
+ pnpm --filter byr-pt-cli skill:publish
64
+ ```