@farthershore/cli 0.24.4 → 0.26.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.
Files changed (4) hide show
  1. package/README.md +31 -26
  2. package/dist/index.js +244 -123
  3. package/dist/mcp.js +29 -35
  4. package/package.json +3 -3
package/README.md CHANGED
@@ -3,11 +3,11 @@
3
3
  Create and operate [FartherShore](https://farthershore.com) software businesses
4
4
  from the terminal.
5
5
 
6
- **Status: `0.24.4`.** Pre-1.0 — the command surface is stable but may still
6
+ **Status: `0.25.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,
10
- and bills access to it at the edge. Product behavior — plans, pricing, limits,
10
+ and bills access to it at the edge. Business behavior — plans, pricing, limits,
11
11
  routes, meters, and origins — is authored in your GitHub repo with
12
12
  [`@farthershore/business`](https://www.npmjs.com/package/@farthershore/business)
13
13
  and applied automatically when you push. This CLI is the tool layer around that
@@ -123,8 +123,8 @@ Run `farthershore <group> --help` for the full flag set of any command.
123
123
  ### `farthershore init`
124
124
 
125
125
  Scaffold a starter business repo locally from a named plan preset. Each preset
126
- fills in a single decorated `business/business.ts` (one `@Business` class
127
- with `@Meter`/`@Feature`/`@Plan` members) and creates the matching customer
126
+ fills in a functional `business/business.ts` using `fs.requests()`,
127
+ `fs.route()`, `fs.plan()`, and a default `fs.business()` export, then creates the matching customer
128
128
  `frontend/` project, repo-local `business/package.json`, `business/tsconfig.json`,
129
129
  and `.gitignore`.
130
130
 
@@ -147,9 +147,9 @@ farthershore init --template starter --surface frontend --surface agent
147
147
  | `prepaid` | $50 one-time signup credit, then pay-as-you-go |
148
148
  | `metered` | Pure pay-as-you-go at $0.001/request |
149
149
 
150
- After `init`, edit the `@Business({ name, origin })` decorator — `origin` is the
151
- business-logic destination FartherShore calls for customer-facing actions — and
152
- add `@Meter`/`@Feature`/`@Plan` members to grow the business. Pass repeatable
150
+ After `init`, add functional meter, route, group, and plan declarations to grow
151
+ the business. Configure the platform-owned upstream origin separately.
152
+ Pass repeatable
153
153
  `--surface <frontend|api|docs|widget|dashboard|webhook|worker|agent>` to seed a
154
154
  specific shape; omitting it keeps the default `frontend + api` starter. Run
155
155
  `npm install` in `business/`, then `farthershore build` from the repo root to
@@ -202,7 +202,7 @@ farthershore validate --local-only --format json
202
202
  ### `farthershore business`
203
203
 
204
204
  Business lifecycle. Creation provisions a managed GitHub repo (the source of
205
- truth for product behavior) under your connected GitHub account and returns the
205
+ truth for business behavior) under your connected GitHub account and returns the
206
206
  clone URL plus bootstrap instructions. A new business starts as a DRAFT with a
207
207
  generated `frontend/` ready to customize.
208
208
 
@@ -295,7 +295,7 @@ farthershore plan migrate weather-api pro --from 1 --to head --policy next_renew
295
295
  ### `farthershore frontend`
296
296
 
297
297
  Managed Frontend Hosting operations plus a local preview. `deploy`, `status`,
298
- `rollback`, and `env` operate the hosted build; `preview` runs the generated
298
+ and `rollback` operate the hosted build; `preview` runs the generated
299
299
  `frontend/`'s `vite dev` with an injected `window.__FS_CONFIG__` shim so the
300
300
  portal renders locally exactly as it serves in production. Pass `--mock` to
301
301
  inject `{ mock: true }` instead of Core/Clerk config for local page inspection
@@ -305,8 +305,6 @@ with placeholder data and auth bypassed.
305
305
  farthershore frontend status weather-api --format json
306
306
  farthershore frontend deploy weather-api --format json
307
307
  farthershore frontend rollback weather-api --release-id <hash> --format json
308
- farthershore frontend env list weather-api --format json
309
- farthershore frontend env set weather-api VITE_PUBLIC_FOO bar --target BUILD --format json
310
308
 
311
309
  # Local preview (shells out to vite; needs a frontend/ project)
312
310
  farthershore frontend dev # hot-reloading dev server, mock mode by default
@@ -349,23 +347,26 @@ Use `consumer list` first to find a `subscriberId`. `block` suspends a user and
349
347
  revokes active API keys. `remove` is irreversible and tears down subscriber state
350
348
  across billing, edge credentials, and subscriptions.
351
349
 
352
- ### `farthershore secret`
350
+ ### `farthershore variables`
353
351
 
354
- Manage private business secrets. Values are encrypted at rest; list/read
355
- responses return metadata only.
352
+ Manage write-only private secrets with one exclusive delivery phase. `BUILD`
353
+ values enter only the isolated managed build and are leak-scanned from its
354
+ artifact. `RUNTIME` values stay out of builds and are injected only by Gateway
355
+ for compiled, granted integrations.
356
356
 
357
357
  ```bash
358
- farthershore secret list weather-api --format json
359
- printf '%s' "$CLERK_SECRET_KEY" | farthershore secret set weather-api \
360
- CLERK_SECRET_KEY --from-stdin --target RUNTIME --format json
361
- farthershore secret delete weather-api CLERK_SECRET_KEY --yes --format json
358
+ farthershore variables list weather-api --format json
359
+ printf '%s' "$SENTRY_AUTH_TOKEN" | farthershore variables set weather-api \
360
+ SENTRY_AUTH_TOKEN --delivery build --format json
361
+ printf '%s' "$POSTHOG_SECRET" | farthershore variables set weather-api \
362
+ POSTHOG_SECRET --delivery runtime --format json
363
+ farthershore variables revoke weather-api POSTHOG_SECRET --yes --format json
364
+ farthershore variables rm weather-api POSTHOG_SECRET --yes --format json
362
365
  ```
363
366
 
364
- Use `frontend env` for public, browser-visible variables (`VITE_PUBLIC_*`,
365
- analytics keys). Use `secret` for server runtime and private build values.
366
- `BUILD` secrets are injected into managed frontend builds and require a redeploy;
367
- `RUNTIME` secrets are for trusted server/backend code and are never exposed to
368
- the browser.
367
+ There is no builder-managed public-variable surface and values are never
368
+ revealed after write. Rotation preserves the delivery phase; changing phase
369
+ requires revoke, delete, and recreate.
369
370
 
370
371
  ### `farthershore backend`
371
372
 
@@ -379,6 +380,10 @@ farthershore backend create weather-api \
379
380
  --name "Production API" \
380
381
  --origin-url https://api.example.com \
381
382
  --format json
383
+ farthershore backend bind weather-api api \
384
+ --env preview-42 \
385
+ --origin-url https://api-pr-42.example.com \
386
+ --format json
382
387
  farthershore backend tokens create weather-api --backend <backendId> --format json
383
388
  farthershore backend tokens rotate weather-api <tokenId> --format json
384
389
  farthershore backend tokens revoke weather-api <tokenId> --yes --format json
@@ -468,7 +473,7 @@ Manage maker tokens for the current org.
468
473
 
469
474
  ```bash
470
475
  farthershore token list --format json
471
- farthershore token create --name "ci-bot" --scope products:update products:publish --format json
476
+ farthershore token create --name "ci-bot" --scope businesses:update businesses:publish --format json
472
477
  farthershore token rotate <tokenId> --sync-to-github --format json
473
478
  farthershore token revoke <tokenId> --yes --format json
474
479
  ```
@@ -508,7 +513,7 @@ In table mode, failures print `Error [CODE]: message` plus a `Hint:` line:
508
513
 
509
514
  ```text
510
515
  Error [STRIPE_NOT_CONFIGURED]: connect Stripe before running billing operations
511
- Hint: Stripe isn't connected on this product. Connect it in the dashboard before running billing operations.
516
+ Hint: Stripe isn't connected on this business. Connect it in the dashboard before running billing operations.
512
517
  ```
513
518
 
514
519
  The bracketed code is stable across releases — quote it in support threads.
@@ -547,7 +552,7 @@ FARTHERSHORE_TOKEN=mk_xxx farthershore-mcp
547
552
  ## Learn more
548
553
 
549
554
  - Platform documentation: [farthershore.com](https://farthershore.com)
550
- - Author product behavior:
555
+ - Author business behavior:
551
556
  [`@farthershore/business`](https://www.npmjs.com/package/@farthershore/business)
552
557
  - Report usage from your backend:
553
558
  [`@farthershore/backend`](https://www.npmjs.com/package/@farthershore/backend)