@beignet/cli 0.0.38 → 0.0.39

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 (77) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +120 -96
  3. package/dist/choices.d.ts +17 -21
  4. package/dist/choices.d.ts.map +1 -1
  5. package/dist/choices.js +21 -67
  6. package/dist/choices.js.map +1 -1
  7. package/dist/create-prompts.d.ts +5 -6
  8. package/dist/create-prompts.d.ts.map +1 -1
  9. package/dist/create-prompts.js +15 -15
  10. package/dist/create-prompts.js.map +1 -1
  11. package/dist/create.d.ts +11 -2
  12. package/dist/create.d.ts.map +1 -1
  13. package/dist/create.js +38 -28
  14. package/dist/create.js.map +1 -1
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +149 -47
  17. package/dist/index.js.map +1 -1
  18. package/dist/inspect.js +54 -1
  19. package/dist/inspect.js.map +1 -1
  20. package/dist/lib.d.ts +1 -1
  21. package/dist/lib.d.ts.map +1 -1
  22. package/dist/make/inbox.js +3 -3
  23. package/dist/make/inbox.js.map +1 -1
  24. package/dist/make/payments.js +3 -3
  25. package/dist/make/payments.js.map +1 -1
  26. package/dist/make/shared.d.ts +10 -3
  27. package/dist/make/shared.d.ts.map +1 -1
  28. package/dist/make/shared.js +7 -8
  29. package/dist/make/shared.js.map +1 -1
  30. package/dist/make.d.ts +3 -2
  31. package/dist/make.d.ts.map +1 -1
  32. package/dist/make.js +455 -185
  33. package/dist/make.js.map +1 -1
  34. package/dist/mcp.d.ts.map +1 -1
  35. package/dist/mcp.js +15 -11
  36. package/dist/mcp.js.map +1 -1
  37. package/dist/provider-add.d.ts +21 -3
  38. package/dist/provider-add.d.ts.map +1 -1
  39. package/dist/provider-add.js +101 -65
  40. package/dist/provider-add.js.map +1 -1
  41. package/dist/task.js +1 -1
  42. package/dist/task.js.map +1 -1
  43. package/dist/templates/base.d.ts +1 -1
  44. package/dist/templates/base.d.ts.map +1 -1
  45. package/dist/templates/base.js +15 -15
  46. package/dist/templates/base.js.map +1 -1
  47. package/dist/templates/index.d.ts +2 -2
  48. package/dist/templates/index.d.ts.map +1 -1
  49. package/dist/templates/index.js +5 -5
  50. package/dist/templates/index.js.map +1 -1
  51. package/dist/templates/server.d.ts.map +1 -1
  52. package/dist/templates/server.js +17 -13
  53. package/dist/templates/server.js.map +1 -1
  54. package/dist/templates/shared.d.ts +4 -4
  55. package/dist/templates/shared.d.ts.map +1 -1
  56. package/dist/templates/shared.js +6 -6
  57. package/dist/templates/shared.js.map +1 -1
  58. package/package.json +2 -2
  59. package/skills/app-structure/SKILL.md +13 -8
  60. package/src/choices.ts +38 -88
  61. package/src/create-prompts.ts +20 -21
  62. package/src/create.ts +54 -36
  63. package/src/index.ts +193 -65
  64. package/src/inspect.ts +101 -1
  65. package/src/lib.ts +1 -1
  66. package/src/make/inbox.ts +3 -3
  67. package/src/make/payments.ts +3 -3
  68. package/src/make/shared.ts +16 -10
  69. package/src/make.ts +578 -176
  70. package/src/mcp.ts +20 -13
  71. package/src/provider-add.ts +159 -79
  72. package/src/task.ts +1 -1
  73. package/src/templates/base.ts +16 -16
  74. package/src/templates/index.ts +6 -6
  75. package/src/templates/server.ts +17 -13
  76. package/src/templates/shared.ts +10 -10
  77. package/src/test-helpers/generated-app.ts +1 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @beignet/cli
2
2
 
3
+ ## 0.0.39
4
+
5
+ ### Patch Changes
6
+
7
+ - aaa4c7a: Generate connected React upload clients, components, and tests with `make upload --ui`.
8
+ - aeb844f: Standardize CLI provider commands, feature artifact names, and app-scoped options, and include provider preset changes in create dry-run plans.
9
+ - 2009e12: Generate contract-backed React Hook Form components from the feature UI addon, including validation errors, mutation errors, reset, invalidation, client setup, and dependencies.
10
+ - @beignet/core@0.0.39
11
+
3
12
  ## 0.0.38
4
13
 
5
14
  ### Patch Changes
package/README.md CHANGED
@@ -40,8 +40,8 @@ equivalent.
40
40
 
41
41
  Running create in an interactive terminal without selection flags opens a
42
42
  prompt-based setup that asks for the project directory, whether to scaffold
43
- an API-only app, which database to use, and which provider integrations to
44
- add. Passing any selection flag (`--api`, `--db`, `--integrations`, or
43
+ an API-only app, which database to use, and which providers to
44
+ add. Passing any selection flag (`--api`, `--db`, `--providers`, or
45
45
  `--package-manager`) skips the prompts, and `--yes` forces the
46
46
  non-interactive defaults (the full-stack SQLite starter with `bun`) even on a
47
47
  terminal. Non-interactive runs in scripts and CI behave exactly as before.
@@ -75,33 +75,32 @@ page and a reduced typed client.
75
75
  The starter ships local production-shaped defaults: Better Auth, Drizzle
76
76
  persistence, pino logging, UOW, durable idempotency, audit logging, no-op error
77
77
  reporting, and devtools. Add workflow artifacts and external service
78
- integrations only when you want those capabilities:
78
+ providers only when you want those capabilities:
79
79
 
80
80
  ```bash
81
- bunx @beignet/cli create my-app --integrations inngest,resend
81
+ bunx @beignet/cli create my-app --providers jobs-inngest,mail-resend
82
82
  ```
83
83
 
84
- Available integrations:
84
+ Available starter-native providers:
85
85
 
86
- - `inngest` - Inngest-backed background jobs via `@beignet/provider-jobs-inngest`
87
- - `resend` - Resend-backed mail via `@beignet/provider-mail-resend`
88
- - `upstash-rate-limit` - Upstash-backed rate limiting via
86
+ - `jobs-inngest` - Inngest-backed background jobs via `@beignet/provider-jobs-inngest`
87
+ - `mail-resend` - Resend-backed mail via `@beignet/provider-mail-resend`
88
+ - `rate-limit-upstash` - Upstash-backed rate limiting via
89
89
  `@beignet/provider-rate-limit-upstash`
90
90
 
91
- `--integrations` also accepts every `beignet providers add` preset
91
+ `--providers` accepts every `beignet provider add` preset
92
92
  (`flags-openfeature`, `jobs-bullmq`, `jobs-inngest`, `mail-resend`,
93
- `mail-smtp`, `payments-stripe`, `redis-cache`, `event-bus-redis`,
94
- `redis-locks`, `s3-storage`, `search-meilisearch`, `sentry`, and
95
- `vercel-blob-storage`). Presets are
93
+ `mail-smtp`, `payments-stripe`, `cache-redis`, `event-bus-redis`,
94
+ `locks-redis`, `storage-s3`, `search-meilisearch`, `error-reporting-sentry`, and
95
+ `storage-vercel-blob`). Presets are
96
96
  applied to the fresh scaffold with the same machinery as
97
- `beignet providers add`; preset names with a template equivalent
98
- (`jobs-inngest`, `mail-resend`, `upstash-rate-limit`) normalize to it, and
99
- selections that fill the same app port (for example `resend` plus
97
+ `beignet provider add`; starter-native presets are rendered directly, and
98
+ selections that fill the same app port (for example `mail-resend` plus
100
99
  `mail-smtp`) fail before any files are written.
101
100
 
102
- Each selected integration adds its provider package dependencies, wires the
101
+ Each selected provider adds its package dependencies, wires the
103
102
  provider in `server/providers.ts`, extends `.env.example`, and writes setup
104
- notes to `docs/integrations.md`.
103
+ notes to `docs/providers.md`.
105
104
 
106
105
  Drizzle persistence ships in every starter; pick the backend with `--db`
107
106
  (default `sqlite`):
@@ -138,6 +137,10 @@ bunx @beignet/cli create my-app --dry-run
138
137
  bunx @beignet/cli create my-app --dry-run --json
139
138
  ```
140
139
 
140
+ When `--providers` includes post-create presets, the preview composes their
141
+ dependency, wiring, environment, and setup-note changes into the final file
142
+ list without creating the target directory.
143
+
141
144
  The CLI writes files only. After creation:
142
145
 
143
146
  ```bash
@@ -185,46 +188,46 @@ bun beignet doctor
185
188
 
186
189
  ```bash
187
190
  beignet create [directory] [options]
188
- beignet task run <name> [options]
189
- beignet outbox drain [options]
190
- beignet outbox list [options]
191
- beignet outbox show <id> [options]
192
- beignet outbox requeue <id> [options]
193
- beignet outbox purge [options]
194
- beignet outbox prune [options]
195
- beignet schedule run <name> [options]
196
- beignet make task <feature>/<name> [options]
197
- beignet make contract <name> [options]
198
- beignet make event <feature>/<name> [options]
199
- beignet make factory <feature>/<name> [options]
200
- beignet make feature <name> [options]
201
- beignet make job <feature>/<name> [options]
202
- beignet make notification <feature>/<name> [options]
203
- beignet make inbox [options]
204
- beignet make outbox [options]
205
- beignet make payments [options]
206
- beignet make tenancy [options]
207
- beignet make listener <feature>/<name> --event <feature>/<event> [options]
208
- beignet make schedule <feature>/<name> [options]
209
- beignet make upload <feature>/<name> [options]
210
- beignet make port <name> [options]
211
- beignet make policy <name> [options]
212
- beignet make adapter <name> [options]
213
- beignet make resource <name> [options]
214
- beignet make seed <feature>/<name> [options]
215
- beignet make test <feature>/<action> [options]
216
- beignet make use-case <feature>/<action> [options]
217
- beignet db generate [--dry-run] [--json]
218
- beignet db migrate [--dry-run] [--json]
219
- beignet db seed [--dry-run] [--json]
220
- beignet db reset [--dry-run] [--json]
221
- beignet db schema sync [--dialect sqlite|postgres|mysql] [--tables audit,idempotency,outbox] [--output <path>] [--dry-run] [--json]
191
+ beignet task run <name> [options] [--cwd <dir>]
192
+ beignet outbox drain [options] [--cwd <dir>]
193
+ beignet outbox list [options] [--cwd <dir>]
194
+ beignet outbox show <id> [options] [--cwd <dir>]
195
+ beignet outbox requeue <id> [options] [--cwd <dir>]
196
+ beignet outbox purge [options] [--cwd <dir>]
197
+ beignet outbox prune [options] [--cwd <dir>]
198
+ beignet schedule run <name> [options] [--cwd <dir>]
199
+ beignet make task <feature.name> [options] [--cwd <dir>]
200
+ beignet make contract <name> [options] [--cwd <dir>]
201
+ beignet make event <feature.name> [options] [--cwd <dir>]
202
+ beignet make factory <feature.name> [options] [--cwd <dir>]
203
+ beignet make feature <name> [options] [--cwd <dir>]
204
+ beignet make job <feature.name> [options] [--cwd <dir>]
205
+ beignet make notification <feature.name> [options] [--cwd <dir>]
206
+ beignet make inbox [options] [--cwd <dir>]
207
+ beignet make outbox [options] [--cwd <dir>]
208
+ beignet make payments [options] [--cwd <dir>]
209
+ beignet make tenancy [options] [--cwd <dir>]
210
+ beignet make listener <feature.name> --event <feature.event> [options] [--cwd <dir>]
211
+ beignet make schedule <feature.name> [options] [--cwd <dir>]
212
+ beignet make upload <feature.name> [--ui] [options] [--cwd <dir>]
213
+ beignet make port <name> [options] [--cwd <dir>]
214
+ beignet make policy <name> [options] [--cwd <dir>]
215
+ beignet make adapter <name> [options] [--cwd <dir>]
216
+ beignet make resource <name> [options] [--cwd <dir>]
217
+ beignet make seed <feature.name> [options] [--cwd <dir>]
218
+ beignet make test <feature.action> [options] [--cwd <dir>]
219
+ beignet make use-case <feature.action> [options] [--cwd <dir>]
220
+ beignet db generate [--dry-run] [--json] [--cwd <dir>]
221
+ beignet db migrate [--dry-run] [--json] [--cwd <dir>]
222
+ beignet db seed [--dry-run] [--json] [--cwd <dir>]
223
+ beignet db reset [--dry-run] [--json] [--cwd <dir>]
224
+ beignet db schema sync [--dialect sqlite|postgres|mysql] [--tables audit,idempotency,outbox] [--output <path>] [--dry-run] [--json] [--cwd <dir>]
222
225
  beignet routes [--json] [--cwd <dir>]
223
226
  beignet check [--json] [--fix] [--cwd <dir>]
224
227
  beignet lint [--json] [--cwd <dir>] [--format human|json|github]
225
228
  beignet doctor [--json] [--strict] [--fix] [--cwd <dir>] [--format human|json|github]
226
- beignet providers add <preset> [--dry-run] [--json] [--cwd <dir>]
227
- beignet providers audit [--json] [--cwd <dir>]
229
+ beignet provider add <preset> [--dry-run] [--json] [--cwd <dir>]
230
+ beignet provider audit [--json] [--cwd <dir>]
228
231
  beignet mcp
229
232
  beignet completion install [--shell bash|zsh] [--json]
230
233
  beignet completion uninstall [--shell bash|zsh] [--json]
@@ -235,37 +238,38 @@ Options:
235
238
  --api Scaffold an API-only app without the UI shell.
236
239
  --db postgres Database backend: sqlite (default), postgres, or mysql.
237
240
  --package-manager bun Package manager shown in next steps.
238
- --integrations inngest,resend Add integrations (inngest, resend, upstash-rate-limit) or any providers add preset. Accepts one value or a comma-separated list.
241
+ --providers jobs-inngest,mail-resend Add provider presets. Accepts one value or a comma-separated list.
239
242
  --yes Skip interactive create prompts and use the defaults.
240
243
  --force Write into a non-empty directory.
241
244
  --dry-run Preview create/make writes without changing files.
242
245
  --json Print machine-readable output.
243
- --cwd path/to/app Run routes, check, lint, doctor, provider add, or provider audit against another app directory.
246
+ --cwd path/to/app Run an existing-app command against another app directory.
244
247
  --format github Output format for lint and doctor: human, json, or github.
245
248
  --input '{"dryRun":true}' JSON input for `beignet task run`.
246
249
  --tenant acme Tenant id or slug passed to the app's createTaskContext by `beignet task run`, separate from task input.
247
250
  --payload '{"date":"..."}' JSON payload for `beignet schedule run`.
248
251
  --module server/tasks.ts Override the task, outbox, or schedule registry path.
249
252
  --batch-size 100 Maximum outbox messages to claim in one drain pass.
250
- --id run_123 Provider or app schedule run ID for schedule runs.
253
+ --run-id run_123 Provider or app schedule run ID for schedule runs.
251
254
  --scheduled-at 2026-01-01 Provider scheduled timestamp for schedule runs.
252
255
  --triggered-at 2026-01-01 Trigger timestamp for schedule runs.
253
256
  --attempt 1 One-based provider attempt number for schedule runs.
254
257
  --source manual Provider or app source label for schedule runs.
255
- --with policy,events Add optional artifacts to `make feature`; also supports factories, seeds, tasks, listeners, jobs, notifications, schedules, ui, uploads.
258
+ --with policy,event Add optional artifacts to `make feature`; supports policy, factory, seed, task, event, listener, job, notification, schedule, ui, and upload.
256
259
  --recipe full-slice Add the canonical full-slice feature recipe: policy, client UI, workflow artifacts, outbox-ready events/jobs, and listener registration.
257
260
  make tenancy Add `features/workspaces` with membership-aware tenant resolution, workspace/member/invite routes, a demo seed, and workspace settings UI on shell apps.
258
261
  make payments Add `features/billing` with free/pro plans, a `createPaymentWebhookRoute(...)` route, billing persistence, entitlement gating, a demo seed, and a plan settings UI on shell apps.
259
262
  make inbox Add `features/inbox` with a per-user notification inbox, an in-app notification channel, cursor-paginated routes, and an inbox page on shell apps.
260
- --auth Add authorization metadata, policy wiring, policy tests, and use-case gate checks to `make resource`.
261
- --tenant Add tenant-scoped schemas, `TenantScope` repository boundaries, and use-case tenant checks to `make resource`.
263
+ --authorization Add authorization metadata, policy wiring, policy tests, and use-case gate checks to `make resource`.
264
+ --tenant-scoped Add tenant-scoped schemas, `TenantScope` repository boundaries, and use-case tenant checks to `make resource`.
262
265
  --events Add created, updated, and deleted domain events to `make resource`.
263
266
  --soft-delete Archive resource rows with deletedAt instead of hard-deleting them.
264
- --event posts/published Event for `make listener`.
267
+ --event posts.published Event for `make listener`.
265
268
  --cron "0 9 * * *" Cron expression for `make schedule`.
266
269
  --timezone America/Chicago Timezone for `make schedule`.
267
270
  --route Add a Next.js cron route for `make schedule`.
268
- providers add redis-cache Add dependencies, provider wiring, env examples, and setup notes for a supported provider preset.
271
+ --ui Add a typed upload client, React uploader, and component test to `make upload`.
272
+ provider add cache-redis Add dependencies, provider wiring, env examples, and setup notes for a supported provider preset.
269
273
  --strict Include CI-oriented doctor warnings and fail on warnings.
270
274
  --fix Apply low-risk doctor fixes before reporting.
271
275
  --shell zsh Shell for `completion install`/`uninstall`. Defaults to $SHELL.
@@ -323,7 +327,7 @@ shell or source the rc file to activate completions. Zsh completions require
323
327
  `compinit` to be loaded, which most zsh setups already do.
324
328
 
325
329
  Completions cover commands, subcommands, flags, and enum flag values such as
326
- `--template` and `--integrations`. The shell scripts call the
330
+ `--template` and `--providers`. The shell scripts call the
327
331
  `beignet completion propose` helper, which prints one proposal per line for a
328
332
  partial command line; it exists for the shell integration and is safe to
329
333
  ignore otherwise. Completions complete whatever `beignet` resolves to on your
@@ -429,12 +433,12 @@ option wherever the Drizzle setup statements and ports are created.
429
433
  Use `database.schemaSources` when operational table definitions live outside
430
434
  the app's canonical `infra/db/schema/`, `drizzle/`, or `infra/db/` files. Each
431
435
  entry can be an app-relative file or directory, an `@/` app path, or a package
432
- specifier such as `@acme/db/schema`. `doctor` and `providers audit` also
436
+ specifier such as `@acme/db/schema`. `doctor` and `provider audit` also
433
437
  follow schema-like imports from app database files, but explicit schema
434
438
  sources make shared-package layouts predictable.
435
439
 
436
440
  Provider metadata describes the standard environment requirements checked by
437
- `doctor --strict` and `providers audit`. When an injected client gets its
441
+ `doctor --strict` and `provider audit`. When an injected client gets its
438
442
  configuration from a platform binding, IAM, or another non-env mechanism,
439
443
  declare only the irrelevant static requirement as an explicit exception:
440
444
 
@@ -496,7 +500,7 @@ around the feature's real workflow.
496
500
  Add common feature-owned artifacts with `--with`:
497
501
 
498
502
  ```bash
499
- beignet make feature projects --with policy,events,jobs,notifications,ui,uploads
503
+ beignet make feature projects --with policy,event,job,notification,ui,upload
500
504
  ```
501
505
 
502
506
  The optional artifacts use predictable starter names:
@@ -506,6 +510,9 @@ The optional artifacts use predictable starter names:
506
510
  - `features/projects/jobs/process.ts`
507
511
  - `features/projects/notifications/created.ts`
508
512
  - `features/projects/components/projects-panel.tsx`
513
+ - `features/projects/attachment-upload-manifest.ts`
514
+ - `features/projects/client/attachment-upload.ts`
515
+ - `features/projects/components/attachment-uploader.tsx`
509
516
  - `features/projects/uploads/attachment.ts`
510
517
 
511
518
  Event, job, notification, and upload registries are created or updated in the
@@ -517,8 +524,12 @@ beignet make feature projects --with ui
517
524
 
518
525
  It writes a feature-colocated client helper at
519
526
  `features/projects/client/queries.ts` and a React component that consumes those
520
- query/mutation options through TanStack Query, with error messages from
521
- `contractErrorMessage` in `@beignet/core/client`.
527
+ query/mutation options through TanStack Query. The component binds the create
528
+ contract through `rhf(contract)`, reuses its body schema for field validation,
529
+ maps server failures with `rootFormError(...)`, resets after success, and
530
+ invalidates the generated list query. If the app does not have one yet, the
531
+ generator also creates the canonical `client/forms.ts` adapter and installs the
532
+ React Hook Form dependencies.
522
533
 
523
534
  Use the named full-slice recipe when you want a richer reference slice:
524
535
 
@@ -529,7 +540,8 @@ beignet make feature projects --recipe full-slice
529
540
  The recipe includes the standard contract, schema, use-case, port, route, test,
530
541
  repository, and wiring files, then adds policy, factories, seeds, tasks,
531
542
  events, listeners, jobs, notifications, schedules, UI client helpers,
532
- components, uploads, outbox wiring, and `outbox_messages` Drizzle schema. The
543
+ components, an upload definition with a connected uploader, outbox wiring, and
544
+ `outbox_messages` Drizzle schema. The
533
545
  generated create use case publishes the generated created event so the event
534
546
  artifact is connected, and the listener registry is registered in
535
547
  `server/listeners.ts` and wired from `server/providers.ts`. Replace the starter names, listener/job bodies,
@@ -543,10 +555,10 @@ Use `make use-case` inside a Beignet app when you want a focused
543
555
  application workflow without generating HTTP contracts or ports:
544
556
 
545
557
  ```bash
546
- beignet make use-case projects/archive-project
558
+ beignet make use-case projects.archive-project
547
559
  ```
548
560
 
549
- The name uses `feature/action` format. The command writes
561
+ The name uses `feature.action` format. The command writes
550
562
  `features/projects/use-cases/archive-project.ts` and creates or updates
551
563
  `features/projects/use-cases/index.ts`. Read-style actions that start with `get`, `list`,
552
564
  `find`, `search`, or `count` generate `.query(...)`; other actions generate
@@ -560,8 +572,8 @@ repository-oriented tests; `make test` is for adding coverage around an
560
572
  additional workflow that does not need a whole new resource slice.
561
573
 
562
574
  ```bash
563
- beignet make use-case projects/archive-project
564
- beignet make test projects/archive-project
575
+ beignet make use-case projects.archive-project
576
+ beignet make test projects.archive-project
565
577
  ```
566
578
 
567
579
  The command writes `features/projects/tests/archive-project.test.ts`, builds the
@@ -624,7 +636,7 @@ main concept is an entity with repository-backed persistence:
624
636
 
625
637
  ```bash
626
638
  beignet make resource projects
627
- beignet make resource projects --auth --tenant --events --soft-delete
639
+ beignet make resource projects --authorization --tenant-scoped --events --soft-delete
628
640
  ```
629
641
 
630
642
  `make resource` generates a CRUD-shaped slice with list, create, get, update,
@@ -647,8 +659,8 @@ memory and Drizzle repositories include the version in the update check and
647
659
  increment it on success. Stale updates become the generated
648
660
  `<Resource>Conflict` catalog error.
649
661
 
650
- Use `--auth` to generate authorization metadata, policy wiring, and use-case
651
- `ctx.gate.authorize(...)` calls. Use `--tenant` to scope repository reads and
662
+ Use `--authorization` to generate authorization metadata, policy wiring, and use-case
663
+ `ctx.gate.authorize(...)` calls. Use `--tenant-scoped` to scope repository reads and
652
664
  writes with a branded `TenantScope`; generated use cases call
653
665
  `requireTenantScope(ctx)`, repository ports require `scope: TenantScope`, and
654
666
  adapters unwrap the storage key with `tenantScopeId(scope)`. `doctor --strict`
@@ -676,16 +688,17 @@ In standard apps, the command also creates
676
688
  Use feature artifact generators when a workflow grows beyond a single use case:
677
689
 
678
690
  ```bash
679
- beignet make task posts/backfill-search
680
- beignet make event posts/published
681
- beignet make job posts/send-published-email
682
- beignet make notification posts/published
683
- beignet make listener posts/enqueue-published-email --event posts/published
684
- beignet make schedule posts/daily-summary --cron "0 9 * * *" --timezone America/Chicago --route
685
- beignet make upload posts/attachment
691
+ beignet make task posts.backfill-search
692
+ beignet make event posts.published
693
+ beignet make job posts.send-published-email
694
+ beignet make notification posts.published
695
+ beignet make listener posts.enqueue-published-email --event posts.published
696
+ beignet make schedule posts.daily-summary --cron "0 9 * * *" --timezone America/Chicago --route
697
+ beignet make upload posts.attachment
698
+ beignet make upload posts.attachment --ui
686
699
  ```
687
700
 
688
- These commands use `feature/name` format and write colocated feature files:
701
+ These commands use `feature.name` format and write colocated feature files:
689
702
 
690
703
  - `features/posts/tasks/backfill-search.ts`
691
704
  - `features/posts/domain/events/published.ts`
@@ -695,6 +708,15 @@ These commands use `feature/name` format and write colocated feature files:
695
708
  - `features/posts/schedules/daily-summary.ts`
696
709
  - `features/posts/uploads/attachment.ts`
697
710
 
711
+ Uploads always add a feature-root client-safe manifest so server constraints
712
+ and browser input hints share one source of truth. In full-stack apps, `--ui`
713
+ also writes `features/posts/client/attachment-upload.ts`,
714
+ `features/posts/components/attachment-uploader.tsx`, and
715
+ `features/posts/tests/attachment-uploader.test.tsx`, then installs
716
+ `@beignet/react-uploads`. The component handles progress, cancellation,
717
+ failures, reset, and completion. API-only apps reject `--ui` before writing;
718
+ omit it to generate the backend upload workflow alone.
719
+
698
720
  Each command creates or updates the folder's `index.ts` with an exported
699
721
  registry such as `postTasks`, `postJobs`, `postNotifications`,
700
722
  `postListeners`, `postSchedules`, or `postUploads`. Task generators also
@@ -722,7 +744,7 @@ event` (and `make resource --events`) wires `eventBus: EventBusPort` with
722
744
  `createInlineNotificationsProvider()`, both dev-default providers from
723
745
  `@beignet/core`. Each port is wired independently — added to `AppPorts`,
724
746
  deferred in `infra/port-wiring.ts`, and registered in `server/providers.ts` —
725
- and skipped when the ports file already has the key, so integrations such as
747
+ and skipped when the ports file already has the key, so providers such as
726
748
  resend (which contributes `mailer`) and app-owned adapters are left
727
749
  untouched. Swap the dev-default provider for a production adapter without
728
750
  rerunning the generator; the port stays the same.
@@ -750,7 +772,9 @@ Event generators use `@beignet/core/events` directly and upload generators use
750
772
  route under `app/api/cron/<feature>/<name>/route.ts`. Generated cron routes
751
773
  require `CRON_SECRET` and record schedule start, completion, and failure events
752
774
  in devtools. Generated uploads include starter metadata, constraints,
753
- authorization, storage key, storage metadata, and completion hooks.
775
+ authorization, storage key, storage metadata, and completion hooks. Use
776
+ `make upload <feature.name> --ui` in a full-stack app to add the connected
777
+ React client and uploader.
754
778
 
755
779
  Use `beignet outbox drain` when you need to drain durable events and jobs from
756
780
  an app-owned CLI, CI, or worker entrypoint:
@@ -804,7 +828,7 @@ queue consumers, or interval polling from provider lifecycle hooks in serverless
804
828
  apps.
805
829
 
806
830
  `make listener` expects the event file to exist at the canonical generated path.
807
- Run `make event <feature>/<event>` first, then generate listeners for that event.
831
+ Run `make event <feature.event>` first, then generate listeners for that event.
808
832
 
809
833
  `make feature` and `make resource` are idempotent for unchanged generated files:
810
834
  repeated runs skip identical files and avoid duplicate wiring. If a generated
@@ -851,8 +875,8 @@ for MySQL.
851
875
  Generate feature-owned test factories and local/demo seeds with:
852
876
 
853
877
  ```bash
854
- beignet make factory posts/post
855
- beignet make seed posts/demo-posts
878
+ beignet make factory posts.post
879
+ beignet make seed posts.demo-posts
856
880
  ```
857
881
 
858
882
  Factories are written under `features/posts/tests/factories/` and persist
@@ -1069,20 +1093,20 @@ metadata in installed package manifests. The CLI does not import provider
1069
1093
  implementation modules to discover those facts, and it reports malformed
1070
1094
  metadata before using provider-derived doctor rules.
1071
1095
 
1072
- Use `beignet providers add <preset>` to wire a stable provider recipe after
1096
+ Use `beignet provider add <preset>` to wire a stable provider recipe after
1073
1097
  app creation. It updates `package.json`, `server/providers.ts`, app port
1074
- types, deferred port wiring, `.env.example`, and `docs/integrations.md`.
1098
+ types, deferred port wiring, `.env.example`, and `docs/providers.md`.
1075
1099
  Supported presets are `flags-openfeature`, `jobs-bullmq`, `jobs-inngest`,
1076
- `mail-resend`, `mail-smtp`, `payments-stripe`, `search-meilisearch`, `sentry`,
1077
- `upstash-rate-limit`, `redis-cache`, `event-bus-redis`, `redis-locks`,
1078
- `s3-storage`, and `vercel-blob-storage`; pass `--dry-run --json` to preview
1100
+ `mail-resend`, `mail-smtp`, `payments-stripe`, `search-meilisearch`, `error-reporting-sentry`,
1101
+ `rate-limit-upstash`, `cache-redis`, `event-bus-redis`, `locks-redis`,
1102
+ `storage-s3`, and `storage-vercel-blob`; pass `--dry-run --json` to preview
1079
1103
  the exact file changes. The same presets can be selected at create time with
1080
- `--integrations`.
1104
+ `--providers`.
1081
1105
 
1082
- Use `beignet providers audit` when you want a report-only inventory of the
1106
+ Use `beignet provider audit` when you want a report-only inventory of the
1083
1107
  provider packages installed in an app. The human audit prints provider
1084
1108
  metadata validity, registration status, required env, required tables, and
1085
- declared app ports. `beignet providers audit --json` returns a versioned
1109
+ declared app ports. `beignet provider audit --json` returns a versioned
1086
1110
  `schemaVersion: 1` payload with active variants and watchers for scripts and
1087
1111
  coding agents. The command does not fail CI for missing setup; stable,
1088
1112
  actionable findings belong in `doctor`.
package/dist/choices.d.ts CHANGED
@@ -13,20 +13,20 @@ export type PackageManager = "bun" | "npm" | "pnpm" | "yarn";
13
13
  */
14
14
  export type TemplateName = "next";
15
15
  /**
16
- * Optional provider integrations that can be scaffolded into a new app.
16
+ * Optional providers rendered directly by the starter template.
17
17
  *
18
18
  * Better Auth, Drizzle/libSQL, and pino ship in every starter, so only
19
- * integrations that add an external service remain selectable.
19
+ * providers that add an external service remain selectable.
20
20
  */
21
- export type IntegrationName = "inngest" | "resend" | "upstash-rate-limit";
21
+ export type StarterProviderName = "jobs-inngest" | "mail-resend" | "rate-limit-upstash";
22
22
  /**
23
23
  * Databases supported by the starter's Drizzle persistence layer.
24
24
  */
25
25
  export type DatabaseName = "sqlite" | "postgres" | "mysql";
26
26
  /**
27
- * Provider setup presets supported by `beignet providers add`.
27
+ * Provider setup presets supported by `beignet provider add`.
28
28
  */
29
- export type ProviderPresetName = "flags-openfeature" | "jobs-bullmq" | "jobs-inngest" | "mail-resend" | "mail-smtp" | "payments-stripe" | "search-meilisearch" | "sentry" | "upstash-rate-limit" | "redis-cache" | "event-bus-redis" | "redis-locks" | "s3-storage" | "vercel-blob-storage";
29
+ export type ProviderPresetName = "flags-openfeature" | "jobs-bullmq" | "jobs-inngest" | "mail-resend" | "mail-smtp" | "payments-stripe" | "search-meilisearch" | "error-reporting-sentry" | "rate-limit-upstash" | "cache-redis" | "event-bus-redis" | "locks-redis" | "storage-s3" | "storage-vercel-blob";
30
30
  /**
31
31
  * Supported scaffold template choices.
32
32
  */
@@ -36,9 +36,9 @@ export declare const templateChoices: readonly ["next"];
36
36
  */
37
37
  export declare const packageManagerChoices: readonly ["bun", "npm", "pnpm", "yarn"];
38
38
  /**
39
- * Supported scaffold integration choices.
39
+ * Supported providers rendered directly by the starter.
40
40
  */
41
- export declare const integrationChoices: readonly ["inngest", "resend", "upstash-rate-limit"];
41
+ export declare const starterProviderChoices: readonly ["jobs-inngest", "mail-resend", "rate-limit-upstash"];
42
42
  /**
43
43
  * Supported scaffold database choices.
44
44
  */
@@ -46,25 +46,21 @@ export declare const databaseChoices: readonly ["sqlite", "postgres", "mysql"];
46
46
  /**
47
47
  * Supported provider setup preset choices.
48
48
  */
49
- export declare const providerPresetChoices: readonly ["flags-openfeature", "jobs-bullmq", "jobs-inngest", "mail-resend", "mail-smtp", "payments-stripe", "search-meilisearch", "sentry", "upstash-rate-limit", "redis-cache", "event-bus-redis", "redis-locks", "s3-storage", "vercel-blob-storage"];
49
+ export declare const providerPresetChoices: readonly ["flags-openfeature", "jobs-bullmq", "jobs-inngest", "mail-resend", "mail-smtp", "payments-stripe", "search-meilisearch", "error-reporting-sentry", "rate-limit-upstash", "cache-redis", "event-bus-redis", "locks-redis", "storage-s3", "storage-vercel-blob"];
50
50
  /**
51
- * Values accepted by `beignet create --integrations`: the starter template
52
- * integrations plus the full `beignet providers add` preset catalog.
51
+ * Values accepted by `beignet create --providers`.
53
52
  */
54
- export type CreateIntegrationName = IntegrationName | ProviderPresetName;
53
+ export type CreateProviderName = ProviderPresetName;
55
54
  /**
56
- * Supported `beignet create --integrations` choices. Template integrations
57
- * come first; the rest of the provider preset catalog follows.
55
+ * Supported `beignet create --providers` choices.
58
56
  */
59
- export declare const createIntegrationChoices: readonly ["inngest", "resend", "upstash-rate-limit", "flags-openfeature", "jobs-bullmq", "jobs-inngest", "mail-resend", "mail-smtp", "payments-stripe", "redis-cache", "event-bus-redis", "redis-locks", "s3-storage", "search-meilisearch", "sentry", "vercel-blob-storage"];
57
+ export declare const createProviderChoices: readonly ["flags-openfeature", "jobs-bullmq", "jobs-inngest", "mail-resend", "mail-smtp", "payments-stripe", "search-meilisearch", "error-reporting-sentry", "rate-limit-upstash", "cache-redis", "event-bus-redis", "locks-redis", "storage-s3", "storage-vercel-blob"];
60
58
  /**
61
- * Split `--integrations` selections into starter template integrations and
62
- * provider presets applied with the `beignet providers add` machinery after
63
- * the scaffold is written. Preset names with a template equivalent are
64
- * normalized to the template integration; duplicates collapse.
59
+ * Split `--providers` selections into providers rendered directly by the
60
+ * starter and presets applied after the scaffold is written.
65
61
  */
66
- export declare function splitCreateIntegrations(values: readonly CreateIntegrationName[]): {
67
- integrations: IntegrationName[];
62
+ export declare function splitCreateProviders(values: readonly CreateProviderName[]): {
63
+ starterProviders: StarterProviderName[];
68
64
  presets: ProviderPresetName[];
69
65
  };
70
66
  /**
@@ -98,7 +94,7 @@ export declare const completionShellChoices: readonly ["bash", "zsh"];
98
94
  /**
99
95
  * Optional artifacts supported by `beignet make feature --with`.
100
96
  */
101
- export declare const makeFeatureAddonChoices: readonly ["policy", "factory", "factories", "event", "events", "job", "jobs", "listener", "listeners", "notification", "notifications", "schedule", "schedules", "seed", "seeds", "task", "tasks", "ui", "upload", "uploads"];
97
+ export declare const makeFeatureAddonChoices: readonly ["policy", "factory", "event", "job", "listener", "notification", "schedule", "seed", "task", "ui", "upload"];
102
98
  /**
103
99
  * Optional artifact accepted by `beignet make feature --with`.
104
100
  */
@@ -1 +1 @@
1
- {"version":3,"file":"choices.d.ts","sourceRoot":"","sources":["../src/choices.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAC7D;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAClC;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,QAAQ,GAAG,oBAAoB,CAAC;AAC1E;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAC;AAC3D;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAC1B,mBAAmB,GACnB,aAAa,GACb,cAAc,GACd,aAAa,GACb,WAAW,GACX,iBAAiB,GACjB,oBAAoB,GACpB,QAAQ,GACR,oBAAoB,GACpB,aAAa,GACb,iBAAiB,GACjB,aAAa,GACb,YAAY,GACZ,qBAAqB,CAAC;AAE1B;;GAEG;AACH,eAAO,MAAM,eAAe,mBAEgB,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,qBAAqB,yCAKY,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,kBAAkB,sDAIgB,CAAC;AAEhD;;GAEG;AACH,eAAO,MAAM,eAAe,0CAIgB,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,qBAAqB,0PAegB,CAAC;AAEnD;;;GAGG;AACH,MAAM,MAAM,qBAAqB,GAAG,eAAe,GAAG,kBAAkB,CAAC;AAEzE;;;GAGG;AACH,eAAO,MAAM,wBAAwB,+QAiBgB,CAAC;AAgBtD;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,SAAS,qBAAqB,EAAE,GACvC;IACD,YAA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