@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>. It combines a
small shared project shell, type-specific guidance, a tooling profile, and the selected
widget-source preset.
The generated project owns no Vite config, index.html, or preview source. pnpm dev
boots tck-preview, and pnpm build type-checks and
bundles every source under widgets/*.
Usage
pnpm create @todayai-labs/widget my-widgets
pnpm create @todayai-labs/widget my-brief --template daily-brief
pnpm create @todayai-labs/widget my-on-demand-feeds --template on-demand-feeds
pnpm create @todayai-labs/widget my-pinned-feed --template pinned-feeds
pnpm create @todayai-labs/widget my-interactive --template interactive-widgets
cd my-widgets
pnpm install
pnpm dev--template selects the widget source preset:
| Template | Contents | Tooling |
|---|---|---|
starter | One interactive widget and one Feed example. | Snapshot |
daily-brief-template-v7 | The current six-card English Daily Brief selection. Aliases: latest, daily-brief, and the former daily-brief-template-v7-minimal. | Minimal |
on-demand-feeds-template-v1 | Six event-driven Feed cards for meaningful polling or external-source changes. Alias: on-demand-feeds. | Minimal |
pinned-feeds-template-v1 | An unordered pinned Feed batch. Alias: pinned-feeds. | Minimal |
interactive-widgets-template-v1 | The current interactive widget batch. Alias: interactive-widgets. | Snapshot |
--list-templates prints the available presets. Historical Daily Brief V1-V6 source packages
remain under widgets/archived/, but they are no longer published as create-widget presets.
Minimal projects omit Playwright, @todayai-labs/tck-snapshot, and the screenshot script.
Snapshot projects include that optional visual-verification toolchain. Both profiles otherwise
use the same SDK and runtime dependencies.
The generated SDK pins match the version of the scaffolder that was invoked. Independently
versioned tooling, such as @todayai-labs/tck-snapshot, receives its own exact version.
What you get
my-widgets/
├── package.json
├── pnpm-workspace.yaml
├── tsconfig.json
├── widgets/
├── GUIDELINES_<TYPE>.md
├── STYLE_GUIDE.md # optional preset-specific visual reference
├── README.md
└── .gitignoreDaily Brief projects include GUIDELINES_FEEDS.md, on-demand Feed projects include
GUIDELINES_ON_DEMAND_FEEDS.md, and pinned Feed projects include
GUIDELINES_PINNED_FEEDS.md. Interactive Widget projects include
GUIDELINES_INTERACTIVE_WIDGET.md; the mixed starter includes
GUIDELINES_STARTER_FEEDS.md and the Interactive Widget guidance. Each file keeps that template's
stable content, lifecycle, manifest, layout, state, and SDK contract. Task-specific authoring
instructions remain maintained by the service. Presets may add STYLE_GUIDE.md for their visual
language.
Source
- Package:
packages/create-widget - Shared files:
packages/create-widget/templates/common - Type guidance:
packages/create-widget/templates/guidance - Tooling profiles:
packages/create-widget/templates/tooling - Template presets:
packages/create-widget/templates/presets