@todayai-labs/create-widget
Scaffolder. `pnpm create @todayai-labs/widget <project-name>` produces a multi-widget TCK project.
The scaffolder. Invoked via pnpm create @todayai-labs/widget <project-name>. Produces a freestanding multi-widget project — package.json with pinned SDK deps, pnpm-workspace.yaml, tsconfig.json, a starter widget in widgets/counter/widget.tck.tsx, and a README.md.
The scaffolded project owns no Vite config, no index.html, no preview source — pnpm dev boots tck-preview which provides those from inside its own package. pnpm build runs tck-bundle --all over widgets/*.
Usage
pnpm create @todayai-labs/widget my-widgets
cd my-widgets
pnpm install
pnpm devThe scaffolded SDK pins (@todayai-labs/tck, tck-host, tck-bundler, tck-preview) match the version of the scaffolder that was invoked, so a pnpm create @todayai-labs/widget@0.4.2 produces a project pinned to the 0.4.2 SDK. The scaffolder bakes its own version into the template at scaffold-time — not at template authoring-time — so a fresh pnpm create always installs the SDK minor it ran as.
What you get
my-widgets/
├── package.json — pinned deps on @todayai-labs/{tck, tck-host, tck-bundler, tck-preview} + react + typescript.
├── pnpm-workspace.yaml — pnpm allowBuilds for esbuild.
├── tsconfig.json — self-contained, no monorepo refs.
├── widgets/
│ └── counter/
│ └── widget.tck.tsx — starter widget.
├── README.md
└── .gitignoreThe scaffolded tsconfig.json is freestanding — no extends against this monorepo's @todayai-labs/tsconfig. The project is meant to be a starting point you take ownership of.
Source
- Package:
packages/create-widget - Template:
packages/create-widget/templates/project - Reference consumer:
apps/preview-playgroundmirrors the project shape this scaffolder produces, but withworkspace:*SDK deps for in-tree testing.