@binaryandthread/cli 0.1.9 → 0.2.1

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
@@ -40,6 +40,7 @@ unambiguous form.)
40
40
  | `bt checkout` | mint a checkout, hand off to the browser to pay, then poll |
41
41
  | `bt order <id>` / `bt log` | track an order / your order history (when logged in) |
42
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 |
43
44
  | `bt drops` | terminal-visible drops |
44
45
  | `bt forget` | wipe your local session + config (keychain token, cart, email) |
45
46
 
@@ -51,9 +52,16 @@ unambiguous form.)
51
52
  | `BT_PUBLISHABLE_KEY` | the **publishable** key, public by design (a secret `sk_` key is rejected) |
52
53
  | `NO_COLOR` / `--no-color` | plain output, no ANSI / inline images |
53
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.
54
62
 
55
63
  Your auth token is **never** stored in config, it lives in the OS keychain (`bt login`).
56
- 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`.
57
65
 
58
66
  ## Scripting: `--json` output & exit codes
59
67
 
@@ -64,8 +72,9 @@ skips the interactive confirm so it never hangs in CI. Field shapes (stable, saf
64
72
  | --- | --- |
65
73
  | `bt browse` / `bt search` | `[{ id, handle, title, price, currency, colours[], channel_stage }]` |
66
74
  | `bt view <handle>` | `{ id, handle, title, price, currency, colours[], sizes[] }` |
67
- | `bt cart` | `{ cart_id, items: [{ id, title, colour, qty, total }], total, currency }` |
68
- | `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[] }] }` |
69
78
  | `bt whoami` | `{ authenticated, tier, commits, standing_pct, token_expires_at, token_expired }` |
70
79
  | `bt order <id>` | `{ display_id, status, fulfillment_status?, tracking? }` |
71
80