DocsCLI

Open documentation actions

Experimental Commands

Deterministic stack recommendations, in-project resource generation, and local capability packs.

Three commands have intentionally narrow support today. They work, but their scope is smaller than the rest of the CLI and it will change.

Operational contract

CommandPreconditionsPreviewWrites
recommendNone. It runs before a project exists.The command only prints.Nothing.
genAn 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.
registryA 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 does not call a language model.

npm create better-fullstack@latest recommend -- --brief "a SaaS with Postgres, auth and payments"
FlagBehavior
--briefRequired natural-language description. Used locally and never sent in telemetry.
--ecosystemForce a supported ecosystem identifier.
--jsonPrint structured recommendation output.

TypeScript has the deepest keyword mapping. Other ecosystem hints currently return ecosystem defaults with a warning rather than a detailed architecture. Always review compatibility and the printed configuration before scaffolding.

For exact control, use explicit create --part ... or ecosystem flags. For agent planning, the MCP server exposes structured schema, compatibility, and plan tools.

Generate resources

gen creates a CRUD-style API resource router for TypeScript projects using tRPC or oRPC. route is an alias for resource.

npm create better-fullstack@latest gen resource post

Preview the generated source and router registration:

npm create better-fullstack@latest gen resource post -- --dry-run
Argument/flagBehavior
resource or routeGenerator kind.
resource nameConverted to camelCase/PascalCase and must start with a letter.
--dirGenerated project directory; defaults to current.
--dry-runPrint planned source and registration without writing.

The generator locates a known src/routers/index.ts, writes a sibling resource file, and registers it in appRouter. It never overwrites an existing resource. If it can generate the file but cannot find a safe registration anchor, it reports manual wiring.

Capability registry

registry installs additive capability packs into an existing project, or lists installed packs.

npm create better-fullstack@latest registry listnpm create better-fullstack@latest registry add ../my-capability-pack -- --dry-run
Argument/flagBehavior
listDefault action. Read installed-pack records from the project.
add <source>Install a pack from a local path or file:// URL.
--project-dirTarget generated project; defaults to current.
--dry-runPreview files, dependencies, and env keys without writing.
--jsonPrint structured output.

Packs may add files, dependencies, and .env.example keys. Existing files are skipped instead of overwritten. Sources are resolved with traversal and symlink-escape protection.

GitHub Sponsors