@farthershore/cli 0.13.0 → 0.14.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 +8 -8
- package/dist/index.js +193 -119
- package/dist/mcp.js +14 -14
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -71,8 +71,8 @@ farthershore auth logout # Clear stored credentials
|
|
|
71
71
|
### `farthershore init`
|
|
72
72
|
|
|
73
73
|
Scaffold a starter software-product repo from a named plan preset. Each preset
|
|
74
|
-
fills in the 5-knob spec
|
|
75
|
-
`
|
|
74
|
+
fills in the 5-knob spec in a single decorated `product/product.config.ts` — one
|
|
75
|
+
`@Product` class with `@Meter`/`@Feature`/`@Plan` members.
|
|
76
76
|
The command also creates a customer `frontend/` project, repo-local
|
|
77
77
|
`product/package.json`, `product/tsconfig.json`, and `.gitignore`, matching the
|
|
78
78
|
two-root shape generated by dashboard product creation.
|
|
@@ -98,10 +98,10 @@ Templates (sourced from shared-types `listPlanPresets()`):
|
|
|
98
98
|
| `prepaid` | $50 one-time signup credit, then PAYG |
|
|
99
99
|
| `metered` | Pure pay-as-you-go at $0.001/request |
|
|
100
100
|
|
|
101
|
-
After `init`, edit the
|
|
101
|
+
After `init`, edit the `@Product({ name, origin })` decorator in
|
|
102
102
|
`product/product.config.ts`. `origin` is the business logic destination Farther
|
|
103
|
-
Shore calls for customer-facing actions.
|
|
104
|
-
|
|
103
|
+
Shore calls for customer-facing actions. Add `@Meter`/`@Feature`/`@Plan`
|
|
104
|
+
members to the class to grow the product. Pass repeatable
|
|
105
105
|
`--surface <frontend|api|docs|widget|dashboard|webhook|worker|agent>` to seed a
|
|
106
106
|
frontend-only, agent, worker, API, or hybrid product. Omitting `--surface`
|
|
107
107
|
keeps the default `frontend + api` starter and its sample gateway route. Run
|
|
@@ -182,7 +182,7 @@ product itself no longer carries a `billingStrategy`. Omitting both meter flags
|
|
|
182
182
|
gives the product a `requests` meter. Plain request counting is
|
|
183
183
|
platform-managed. Variable-value meters such as tokens, credits, or compute must
|
|
184
184
|
be declared in the Product SDK as route `reports` and reported by the upstream
|
|
185
|
-
with `@farthershore/
|
|
185
|
+
with `@farthershore/backend`.
|
|
186
186
|
|
|
187
187
|
A new product starts as a DRAFT with a generated `frontend/` project ready for
|
|
188
188
|
customization. Going live mirrors the dashboard's "Finish setting up" checklist:
|
|
@@ -288,10 +288,10 @@ farthershore backend tokens revoke weather-api <tokenId> --yes --format json
|
|
|
288
288
|
farthershore backend delete weather-api <backendId> --yes --format json
|
|
289
289
|
```
|
|
290
290
|
|
|
291
|
-
Pair the token with `@farthershore/
|
|
291
|
+
Pair the token with `@farthershore/backend` in the upstream:
|
|
292
292
|
|
|
293
293
|
```ts
|
|
294
|
-
import { fartherShore, withUsage } from "@farthershore/
|
|
294
|
+
import { fartherShore, withUsage } from "@farthershore/backend";
|
|
295
295
|
|
|
296
296
|
const fs = fartherShore.initFromEnv();
|
|
297
297
|
|