CLI
Open documentation actions
Experimental Commands
Deterministic stack recommendations, in-project resource generation, and local capability packs.
Three commands have intentionally narrow scope today. They work, but their surface is smaller than the rest of the CLI and it will change.
Operational contract
| Command | Preconditions | Preview | Writes |
|---|---|---|---|
recommend | None. Runs before a project exists. | The command only prints. | Nothing. |
gen | An existing generated TypeScript project using tRPC or oRPC. | --dry-run prints source and wiring. | One resource file plus the router index when a safe anchor exists. |
registry | A generated project and a trusted local directory or file:// pack source. | --dry-run lists files, deps, env keys. | New files and metadata. Existing files are skipped rather than overwritten. |
Run any of them on a clean Git worktree so you can revert the diff.
Recommend a stack
recommend maps keywords in a brief to a validated preset-style configuration and prints the rationale. It is deterministic and never calls a language model:
npm create better-fullstack@latest recommend -- --brief "a SaaS with Postgres, auth and payments"Flags: --brief (required; used locally and never sent in telemetry), --ecosystem, and --json.
TypeScript has the deepest keyword mapping. Other ecosystem hints currently return ecosystem defaults with a warning. Always review the printed configuration before scaffolding, and prefer explicit create --part ... flags when you know exactly what you want.
Generate resources
gen resource <name> creates a CRUD-style API resource router for TypeScript projects using tRPC or oRPC. route is an alias:
npm create better-fullstack@latest gen resource postThe generator converts the name to camelCase/PascalCase, writes a sibling file next to src/routers/index.ts, and registers it in appRouter. It never overwrites an existing resource, and it reports manual wiring when it cannot find a safe registration anchor. Flags: --dir for the project directory and --dry-run to preview source and registration.
Other ecosystems, API styles, database-backed models, migrations, and frontend screens are not supported yet. The generated example uses an in-memory store as a starting point, not persistence.
Capability registry
registry list shows installed packs and registry add <source> installs one from a local path or file:// URL:
npx create-better-fullstack@latest registry add ../my-capability-pack --dry-runPacks may add files, dependencies, and .env.example keys. Existing files are skipped instead of overwritten, sources are resolved with traversal and symlink-escape protection, and --json prints structured output.