@farthershore/cli 0.33.5 → 0.34.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 +43 -54
- package/dist/index.js +110 -110
- package/dist/mcp.js +73 -72
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Create and operate [FartherShore](https://farthershore.com) software businesses
|
|
4
4
|
from the terminal.
|
|
5
5
|
|
|
6
|
-
**Status: `0.
|
|
6
|
+
**Status: `0.34.0`.** Pre-1.0 — the command surface is stable but may still
|
|
7
7
|
change between minor versions. Pin an exact version in CI.
|
|
8
8
|
|
|
9
9
|
FartherShore lets you define a software business as code, then sells, meters,
|
|
@@ -21,19 +21,19 @@ the explicitly agent-operable subset of the CLI surface.
|
|
|
21
21
|
## Install
|
|
22
22
|
|
|
23
23
|
```bash
|
|
24
|
-
npm install -g @farthershore/cli@0.
|
|
24
|
+
npm install -g @farthershore/cli@0.34.0
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
Or run it directly with npx:
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
-
npx -p @farthershore/cli@0.
|
|
30
|
+
npx -p @farthershore/cli@0.34.0 farthershore --help
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
The package also ships an MCP stdio server for agents:
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
|
-
npx -p @farthershore/cli@0.
|
|
36
|
+
npx -p @farthershore/cli@0.34.0 farthershore-mcp
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
## Authentication
|
|
@@ -87,12 +87,11 @@ credentials into the managed repository.
|
|
|
87
87
|
Create a managed business repo, author the business, validate it, and push:
|
|
88
88
|
|
|
89
89
|
```bash
|
|
90
|
-
# 1. Create the managed repo.
|
|
91
|
-
|
|
92
|
-
--idempotency-key <persisted-business-create-attempt-key>)
|
|
90
|
+
# 1. Create the managed repo. The command prints its URL.
|
|
91
|
+
farthershore business create weather-api
|
|
93
92
|
|
|
94
93
|
# 2. Clone it and author business/ from scratch.
|
|
95
|
-
git clone
|
|
94
|
+
git clone <printed-repository-url>
|
|
96
95
|
cd weather-api
|
|
97
96
|
# ...author business/ with @farthershore/business...
|
|
98
97
|
|
|
@@ -246,9 +245,8 @@ Run the same verdict the GitHub `farthershore/validate` PR check produces, befor
|
|
|
246
245
|
you push. It builds the manifest twice and compares the IR hash (the determinism
|
|
247
246
|
check the build runner enforces), then — when you pass `--business` — submits the
|
|
248
247
|
IR for a server verdict that returns compile diagnostics, the semantic diff, and
|
|
249
|
-
an economic-change verdict.
|
|
250
|
-
|
|
251
|
-
to repeat and does not take an idempotency key.
|
|
248
|
+
an economic-change verdict. Validation never accepts or publishes business
|
|
249
|
+
state, so it is safe to repeat.
|
|
252
250
|
|
|
253
251
|
```bash
|
|
254
252
|
farthershore validate # local build + determinism only
|
|
@@ -273,11 +271,10 @@ farthershore business subdomain-check weather-api --format json
|
|
|
273
271
|
|
|
274
272
|
farthershore business create weather-api \
|
|
275
273
|
--display-name "Weather API" \
|
|
276
|
-
--idempotency-key <persisted-business-create-attempt-key> \
|
|
277
274
|
--format json
|
|
278
275
|
|
|
279
|
-
farthershore business publish weather-api --format json
|
|
280
|
-
farthershore business rollback weather-api wfe_previous --reason "bad release" --format json
|
|
276
|
+
farthershore business publish weather-api --format json
|
|
277
|
+
farthershore business rollback weather-api wfe_previous --reason "bad release" --format json
|
|
281
278
|
```
|
|
282
279
|
|
|
283
280
|
Deleting a business is **stage only** — the command is not registered in the
|
|
@@ -377,7 +374,7 @@ farthershore organization role list <organizationId> --filter builtIn=true --sor
|
|
|
377
374
|
farthershore organization members <organizationId> --filter roleKey=auditor --sort email:asc --search person --format json
|
|
378
375
|
|
|
379
376
|
# Primary owner only; hands ultimate authority to another existing member.
|
|
380
|
-
farthershore organization ownership-transfer <organizationId> <newOwnerUserId> --yes --format json
|
|
377
|
+
farthershore organization ownership-transfer <organizationId> <newOwnerUserId> --yes --format json
|
|
381
378
|
```
|
|
382
379
|
|
|
383
380
|
Selecting the default organization is a local credential concern, not an API
|
|
@@ -399,20 +396,17 @@ farthershore token permission-catalog --org --format json
|
|
|
399
396
|
farthershore token create deploy-bot --org \
|
|
400
397
|
--permissions '["business:read","business:publish"]' \
|
|
401
398
|
--businesses business_1,business_2 \
|
|
402
|
-
--idempotency-key org-token-create-2026-08-11 \
|
|
403
399
|
--format json
|
|
404
400
|
|
|
405
401
|
farthershore token list --org --format json
|
|
406
402
|
farthershore token approvals --org --format json
|
|
407
|
-
farthershore token approve <approvalId> --org --format json
|
|
403
|
+
farthershore token approve <approvalId> --org --format json
|
|
408
404
|
farthershore token approve <approvalId> --org \
|
|
409
|
-
--idempotency-key <persisted-token-approve-attempt-key> \
|
|
410
405
|
--permissions '["business:read"]' --format json # trim on approval
|
|
411
406
|
farthershore token deny <approvalId> --org --format json
|
|
412
407
|
farthershore token update <tokenId> --org \
|
|
413
|
-
--permissions '["business:read"]'
|
|
414
|
-
|
|
415
|
-
farthershore token rotate <tokenId> --org --format json --idempotency-key <persisted-token-rotate-attempt-key>
|
|
408
|
+
--permissions '["business:read"]' --format json
|
|
409
|
+
farthershore token rotate <tokenId> --org --format json
|
|
416
410
|
farthershore token revoke <tokenId> --org --yes --format json
|
|
417
411
|
```
|
|
418
412
|
|
|
@@ -423,10 +417,7 @@ exactly once; store it immediately. Human output follows the same rule: it
|
|
|
423
417
|
prints plaintext only for an ACTIVE one-time-secret response and says explicitly
|
|
424
418
|
when a PENDING request minted nothing.
|
|
425
419
|
|
|
426
|
-
|
|
427
|
-
dispatch and reuse it only when repeating that exact logical request after an
|
|
428
|
-
interrupted invocation. The CLI never generates a key: a process-local key
|
|
429
|
-
would be lost across the restart where retry safety matters most.
|
|
420
|
+
If a create or update times out, run `token list --org` before trying again.
|
|
430
421
|
|
|
431
422
|
### `farthershore stripe`
|
|
432
423
|
|
|
@@ -462,26 +453,22 @@ export FARTHERSHORE_SUBSCRIBER_ORGANIZATION_ID='<subscriber organization UUID>'
|
|
|
462
453
|
farthershore service-account list <businessId> --format json
|
|
463
454
|
farthershore service-account create <businessId> deploy-bot \
|
|
464
455
|
--permissions '["route:read","route:write"]' \
|
|
465
|
-
--scopes '["production"]'
|
|
466
|
-
--idempotency-key sa-create-2026-08-11 --format json
|
|
456
|
+
--scopes '["production"]' --format json
|
|
467
457
|
farthershore service-account update <businessId> <serviceAccountId> \
|
|
468
|
-
--permissions '["route:read"]'
|
|
469
|
-
--idempotency-key sa-update-2026-08-11 --format json
|
|
458
|
+
--permissions '["route:read"]' --format json
|
|
470
459
|
farthershore service-account approvals <businessId> --format json
|
|
471
460
|
farthershore service-account approve <businessId> <approvalId> \
|
|
472
461
|
--permissions '["route:read"]' --format json # optional trim
|
|
473
462
|
farthershore service-account deny <businessId> <approvalId> --format json
|
|
474
|
-
farthershore service-account rotate <businessId> <serviceAccountId> --format json
|
|
463
|
+
farthershore service-account rotate <businessId> <serviceAccountId> --format json
|
|
475
464
|
farthershore service-account revoke <businessId> <serviceAccountId> --yes --format json
|
|
476
465
|
```
|
|
477
466
|
|
|
478
467
|
Pass `--environment-id` and `--subscriber-organization` to override the two
|
|
479
468
|
context environment variables for one command. PENDING create/update responses
|
|
480
469
|
never print `plaintext`. ACTIVE creates
|
|
481
|
-
and rotations print the one-time key once.
|
|
482
|
-
|
|
483
|
-
success includes `meta.idempotency.replayed: true`; follow it with a list read
|
|
484
|
-
before reporting current state.
|
|
470
|
+
and rotations print the one-time key once. If one of these commands times out,
|
|
471
|
+
run `service-account list` before trying again.
|
|
485
472
|
|
|
486
473
|
This group is direct CLI-only and deliberately has no MCP projection: the MCP
|
|
487
474
|
operation registry carries builder principals, not portal consumer sessions.
|
|
@@ -573,7 +560,7 @@ organization composes those permissions into its own product roles.
|
|
|
573
560
|
|
|
574
561
|
```bash
|
|
575
562
|
# First persona creates and owns a temporary subscriber workspace.
|
|
576
|
-
farthershore persona bootstrap weather-api --env preview --plan pro --format json
|
|
563
|
+
farthershore persona bootstrap weather-api --env preview --plan pro --format json
|
|
577
564
|
farthershore persona list weather-api --env preview --format json
|
|
578
565
|
farthershore persona login weather-api <ownerPersonaId> --env preview --format json
|
|
579
566
|
|
|
@@ -581,9 +568,9 @@ farthershore persona login weather-api <ownerPersonaId> --env preview --format j
|
|
|
581
568
|
# created roles/defaults through the normal customer RBAC surface.
|
|
582
569
|
farthershore persona bootstrap weather-api --env preview --plan pro \
|
|
583
570
|
--subscriber-id <subscriberId> --account-role member --role viewer \
|
|
584
|
-
--format json
|
|
571
|
+
--format json
|
|
585
572
|
|
|
586
|
-
farthershore persona rotate weather-api <personaId> --env preview --format json
|
|
573
|
+
farthershore persona rotate weather-api <personaId> --env preview --format json
|
|
587
574
|
farthershore persona delete weather-api <personaId> --env preview --format json
|
|
588
575
|
```
|
|
589
576
|
|
|
@@ -591,7 +578,13 @@ Bootstrap and rotation return a key once. `login` sends the 60-second,
|
|
|
591
578
|
single-use handoff only in the browser URL fragment to the platform-owned
|
|
592
579
|
`/persona-sign-in` bridge. The bridge establishes an HttpOnly browser session
|
|
593
580
|
and returns to the exact original portal path, query, and fragment. CLI output
|
|
594
|
-
contains portal metadata but never the handoff or a session bearer.
|
|
581
|
+
contains portal metadata but never the handoff or a session bearer. `login`
|
|
582
|
+
emits `opened: true` only after the system browser launcher (`open` /
|
|
583
|
+
`xdg-open`) has exited successfully, so the URL has been handed off before the
|
|
584
|
+
command returns; a launcher failure is reported as an error. The wait is capped
|
|
585
|
+
at 20 seconds: a launcher still running then (for example `xdg-open` running
|
|
586
|
+
the browser in the foreground) is detached, and `login` emits `opened: false`
|
|
587
|
+
with a stderr notice instead of hanging until the browser closes. Product
|
|
595
588
|
role keys must already exist in that subscriber's role catalog; omit `--role` to use its
|
|
596
589
|
configured default. Deletion tears down the temporary user and credential, and
|
|
597
590
|
deleting the environment also removes the remaining persona-owned workspace.
|
|
@@ -636,11 +629,11 @@ compiled integration that references it.
|
|
|
636
629
|
```bash
|
|
637
630
|
farthershore variables list weather-api --format json
|
|
638
631
|
printf '%s' "$SENTRY_AUTH_TOKEN" | farthershore variables set weather-api \
|
|
639
|
-
SENTRY_AUTH_TOKEN --format json
|
|
632
|
+
SENTRY_AUTH_TOKEN --format json
|
|
640
633
|
printf '%s' "$POSTHOG_PROJECT_KEY" | farthershore variables set weather-api \
|
|
641
|
-
FS_PUBLIC_POSTHOG_KEY --format json
|
|
642
|
-
farthershore variables revoke weather-api POSTHOG_SECRET --yes --format json
|
|
643
|
-
farthershore variables rm weather-api POSTHOG_SECRET --yes --format json
|
|
634
|
+
FS_PUBLIC_POSTHOG_KEY --format json
|
|
635
|
+
farthershore variables revoke weather-api POSTHOG_SECRET --yes --format json
|
|
636
|
+
farthershore variables rm weather-api POSTHOG_SECRET --yes --format json
|
|
644
637
|
```
|
|
645
638
|
|
|
646
639
|
There is no builder-managed public-variable surface and values are never
|
|
@@ -658,14 +651,13 @@ farthershore backend list weather-api --format json
|
|
|
658
651
|
farthershore backend create weather-api \
|
|
659
652
|
--name "Production API" \
|
|
660
653
|
--origin-url https://api.example.com \
|
|
661
|
-
--idempotency-key <persisted-backend-create-attempt-key> \
|
|
662
654
|
--format json
|
|
663
655
|
farthershore backend bind weather-api api \
|
|
664
656
|
--env preview-42 \
|
|
665
657
|
--origin-url https://api-pr-42.example.com \
|
|
666
658
|
--format json
|
|
667
|
-
farthershore backend tokens create weather-api --backend <backendId> --format json
|
|
668
|
-
farthershore backend tokens rotate weather-api <tokenId> --format json
|
|
659
|
+
farthershore backend tokens create weather-api --backend <backendId> --format json
|
|
660
|
+
farthershore backend tokens rotate weather-api <tokenId> --format json
|
|
669
661
|
farthershore backend tokens revoke weather-api <tokenId> --yes --format json
|
|
670
662
|
```
|
|
671
663
|
|
|
@@ -710,13 +702,12 @@ farthershore webhook list weather-api --format json
|
|
|
710
702
|
farthershore webhook create weather-api \
|
|
711
703
|
--url https://hooks.example.com/farthershore \
|
|
712
704
|
--events subscription.created,payment.failed \
|
|
713
|
-
--idempotency-key <persisted-webhook-create-attempt-key> \
|
|
714
705
|
--format json
|
|
715
706
|
farthershore webhook update weather-api <webhookId> --disable --format json
|
|
716
|
-
farthershore webhook test weather-api <webhookId> --
|
|
717
|
-
farthershore webhook trigger weather-api <webhookId> --type payment.failed --
|
|
707
|
+
farthershore webhook test weather-api <webhookId> --format json
|
|
708
|
+
farthershore webhook trigger weather-api <webhookId> --type payment.failed --format json
|
|
718
709
|
farthershore webhook deliveries weather-api <webhookId> --limit 20 --format json
|
|
719
|
-
farthershore webhook rotate weather-api <webhookId> --format json
|
|
710
|
+
farthershore webhook rotate weather-api <webhookId> --format json
|
|
720
711
|
farthershore webhook delete weather-api <webhookId> --yes --format json
|
|
721
712
|
```
|
|
722
713
|
|
|
@@ -755,10 +746,8 @@ Manage checkout promo codes (operational state, not part of the manifest).
|
|
|
755
746
|
farthershore promo-code list weather-api --format json
|
|
756
747
|
farthershore promo-code create weather-api \
|
|
757
748
|
--code LAUNCH25 --kind percent_off --percent 25 --duration-months 3 \
|
|
758
|
-
--idempotency-key <persisted-promo-code-create-attempt-key> \
|
|
759
749
|
--plan <planId> --format json
|
|
760
750
|
farthershore promo-code create weather-api \
|
|
761
|
-
--idempotency-key <persisted-promo-code-create-attempt-key> \
|
|
762
751
|
--code SAVE500 --kind amount_off --amount-cents 500 --duration-months 1 --format json
|
|
763
752
|
farthershore promo-code archive weather-api <promoCodeId> --format json
|
|
764
753
|
farthershore promo-code reactivate weather-api <promoCodeId> --format json
|
|
@@ -774,18 +763,18 @@ Use `--all-plans` to clear plan scoping.
|
|
|
774
763
|
Install or refresh the platform-verified skills bundle together. The platform
|
|
775
764
|
pins this immutable release, and CI plus a daily repository check compare it to
|
|
776
765
|
GitHub's latest stable release so the guidance cannot silently drift.
|
|
777
|
-
This command requires `@farthershore/cli` 0.
|
|
766
|
+
This command requires `@farthershore/cli` 0.34.0 or newer.
|
|
778
767
|
|
|
779
768
|
```bash
|
|
780
769
|
set -euo pipefail
|
|
781
770
|
CLI_VERSION=$(farthershore --version)
|
|
782
|
-
printf '%s' "$CLI_VERSION" | node -e 'let v=""; process.stdin.on("data", c => v += c).on("end", () => { const m = /^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(?:\+[0-9A-Za-z.-]+)?$/.exec(v.trim()); if (!m || !(+m[1] > 0 || +m[2] >
|
|
771
|
+
printf '%s' "$CLI_VERSION" | node -e 'let v=""; process.stdin.on("data", c => v += c).on("end", () => { const m = /^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(?:\+[0-9A-Za-z.-]+)?$/.exec(v.trim()); if (!m || !(+m[1] > 0 || +m[2] > 34 || (+m[2] === 34 && +m[3] >= 0))) { console.error("Stop: CLI 0.34.0 or newer is required; ask the human to upgrade."); process.exitCode = 1; } })'
|
|
783
772
|
farthershore skills install --help
|
|
784
773
|
farthershore skills install
|
|
785
774
|
```
|
|
786
775
|
|
|
787
776
|
If either prerequisite fails, stop and ask the human to run
|
|
788
|
-
`npm install -g @farthershore/cli@0.
|
|
777
|
+
`npm install -g @farthershore/cli@0.34.0`, then repeat the checks.
|
|
789
778
|
Do not install or upgrade global tooling autonomously.
|
|
790
779
|
|
|
791
780
|
The Farther Shore CLI downloads the exact installer archive and verifies this
|