Read the root AGENTS.md first. This file adds scaffolding-specific rules.
The project scaffolding CLI. index.ts (the command, template registry), prompts.ts (interactive setup), templates.ts (generated project files as code), templates.test.ts.
- Templates are generated in code, not stored as a
templates/directory. Add agenerate<Name>Template(config)function intemplates.ts, following the existinggenerate*Templatefunctions. - Register the template key in both the
TEMPLATESlist andTEMPLATE_KEYSinindex.ts. - Generated
package.jsonscripts use Bun:"dev": "bun --watch src/index.tsx","start": "bun dist/index.js". Nevernodeortsx.
- Generated projects target Bun. The generated
package.jsonsetsengines.bun. - A template must boot on its own. If it references a widget or adapter that does not exist yet, give it a self-contained mock so the scaffold runs without that dependency.
- Do not hardcode absolute paths. Use the config object for the project name and directory.
bun vitest run packages/create-termui-app