@farthershore/cli 0.25.0 → 0.27.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 +25 -20
  2. package/dist/index.js +247 -113
  3. package/dist/mcp.js +25 -30
  4. package/package.json +3 -3
package/README.md CHANGED
@@ -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
@@ -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