@binaryandthread/cli 0.1.8 → 0.2.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 CHANGED
@@ -23,18 +23,24 @@ A bare `bt` may collide with another binary on your `PATH`. If it does, this pac
23
23
  **`btn`** as an alias, `btn browse` works identically. (`npx @binaryandthread/cli …` is always the
24
24
  unambiguous form.)
25
25
 
26
+ > **The only package is the scoped `@binaryandthread/cli`** (signed, 2FA-published). `npx bnt`,
27
+ > `npx bt`, `npx btn`, and `npx binaryandthread` are **different, unscoped packages owned by
28
+ > strangers** — never run them. Always install the full scoped name.
29
+
26
30
  ## Commands
27
31
 
28
32
  | command | what it does |
29
33
  | --- | --- |
30
- | `bt browse` | the catalog (interactive ↑/↓ picker on a TTY; `--json` for scripts) |
34
+ | `bt browse` | the catalog as a numbered table (`bt stage <n>`); `--pick` opts into the ↑/↓ picker; `--json` for scripts |
31
35
  | `bt search <q>` | filter the catalog |
32
- | `bt view <handle>` | one piece, specs + mockup (`--colour black` renders the black row) |
33
- | `bt stage <handle>` | add to your cart (`--size`, `--colour`) |
36
+ | `bt view <n\|slug>` | one piece, specs + mockup (`--colour black` renders the black row) |
37
+ | `bt stage <n\|slug>` | add to your cart (`--size`, `--colour`) |
38
+ | `bt blame <n\|slug>` | the design's lore + sources (git blame, for motifs) |
34
39
  | `bt cart` / `bt unstage <ref>` | show / remove a line |
35
40
  | `bt checkout` | mint a checkout, hand off to the browser to pay, then poll |
36
41
  | `bt order <id>` / `bt log` | track an order / your order history (when logged in) |
37
42
  | `bt login` / `bt whoami` / `bt logout` | magic-link auth → JWT in your OS keychain |
43
+ | `bt region` | show your ship-to country + currency; `bt region <cc>` to set it (validated), `bt region --list` for every country we ship to |
38
44
  | `bt drops` | terminal-visible drops |
39
45
  | `bt forget` | wipe your local session + config (keychain token, cart, email) |
40
46
 
@@ -46,9 +52,16 @@ unambiguous form.)
46
52
  | `BT_PUBLISHABLE_KEY` | the **publishable** key, public by design (a secret `sk_` key is rejected) |
47
53
  | `NO_COLOR` / `--no-color` | plain output, no ANSI / inline images |
48
54
  | `--json` | machine-readable output for scripts / CI |
55
+ | `--region <cc>` | ship-to country for this command (ISO-2), overriding your saved region |
56
+
57
+ **Region & currency.** We ship internationally, so prices + shipping are shown in your ship-to
58
+ country's currency. Set it once with `bt region <cc>` (or `bt config set region <cc>`), override it
59
+ per-command with `--region <cc>`, and see the full list with `bt region --list`. Setting an
60
+ unshippable country is refused, and the money commands (`stage` / `checkout`) fail closed rather than
61
+ charge you in a substituted currency.
49
62
 
50
63
  Your auth token is **never** stored in config, it lives in the OS keychain (`bt login`).
51
- Local config (cart id, email, defaults) lives at `~/.config/bt/config.json`.
64
+ Local config (cart id, email, region, defaults) lives at `~/.config/bt/config.json`.
52
65
 
53
66
  ## Scripting: `--json` output & exit codes
54
67
 
@@ -59,8 +72,9 @@ skips the interactive confirm so it never hangs in CI. Field shapes (stable, saf
59
72
  | --- | --- |
60
73
  | `bt browse` / `bt search` | `[{ id, handle, title, price, currency, colours[], channel_stage }]` |
61
74
  | `bt view <handle>` | `{ id, handle, title, price, currency, colours[], sizes[] }` |
62
- | `bt cart` | `{ cart_id, items: [{ id, title, colour, qty, total }], total, currency }` |
63
- | `bt checkout` | `{ status: "placed"\|"timeout"\|"expired", order_id?, display_id?, checkout_url? }` |
75
+ | `bt cart` | `{ cart_id, items: [{ id, title, colour, qty, total }], total, total_excludes_shipping }` |
76
+ | `bt checkout` | `{ status: "placed"\|"timeout"\|"expired", order_id?, display_id?, total?, currency?, checkout_url? }` |
77
+ | `bt region` | `{ region, currency, matched, home }` · `--list` → `{ regions: [{ currency, countries[] }] }` |
64
78
  | `bt whoami` | `{ authenticated, tier, commits, standing_pct, token_expires_at, token_expired }` |
65
79
  | `bt order <id>` | `{ display_id, status, fulfillment_status?, tracking? }` |
66
80