CLI Reference
The routa command checks route contracts, builds generated route metadata, runs the development server, and scaffolds projects from OpenAPI files.
Install it as a development dependency:
pnpm add -D @routa-ts/cliCommands
Section titled “Commands”pnpm exec routa create [dir]pnpm exec routa scaffold <openapi.yaml|openapi.yml|openapi.json>pnpm exec routa scaffold openapi.yaml --previewpnpm exec routa scaffold openapi.yaml --yespnpm exec routa devpnpm exec routa startpnpm exec routa checkpnpm exec routa buildpnpm exec routa openapi checkpnpm exec routa openapi breakingpnpm exec routa openapi breaking --update-baselineCommand Behavior
Section titled “Command Behavior”routa create [dir]: creates a new Routa app. Flags include--install,--git, and--no-openapi.routa scaffold <file>: generates route and schema files from OpenAPI. Use--previewbefore writing changes and--yesto approve scaffold changes.routa dev: validates routes, writes metadata, typechecks, and starts the development server.routa start: validates routes, typechecks, and starts the runtime server.routa check: validates Routa route graph and runstsc -p tsconfig.json --noEmit.routa build: validates Routa route graph and runs TypeScript emit.routa openapi check: compares generated OpenAPI against.routa/openapi-baseline.json.routa openapi breaking: fails when operations were removed from the baseline.routa openapi breaking --update-baseline: writes the current generated OpenAPI as the new baseline.
New Projects
Section titled “New Projects”pnpm create routa-ts@latestStatus
Section titled “Status”The CLI is part of the v0 implementation baseline. Keep generated behavior aligned with the repository acceptance specs as the framework evolves.