create-web-loom
Scaffold a Vite app, install @web-loom packages, and replace runnable Vite starter files with Web Loom MVVM starter overlays.
create-web-loom
create-web-loom scaffolds a Vite project, installs Web Loom packages, and applies framework-specific starter overlays so your app boots into a Web Loom MVVM counter immediately.
It supports npm, pnpm, yarn, and bun.
npm create web-loom@latestFlow
- Vite scaffold: Runs
create-viteinteractively. - Scaffold detection: Detects framework + JS/TS variant.
- Package install: Installs published
@web-loom/*packages. - Starter overlay: Copies templates from
src/templates/sharedandsrc/templates/<framework>/<variant>into the generated project.
The overlay intentionally replaces Vite's runnable starter entry files.
create-vite is invoked with --no-immediate so Web Loom install + overlay steps always complete before any dev-server flow.
If a generated scaffold cannot be mapped to a supported template target, the CLI fails fast with an unsupported-scaffold error instead of writing incorrect files.
Supported frameworks
- React (TS, JS):
src/App.tsx/src/App.jsx - Preact (TS, JS):
src/app.tsx/src/app.jsx - Vue (TS, JS):
src/App.vue - Solid (TS, JS):
src/App.tsx/src/App.jsx - Svelte (TS, JS):
src/App.svelte - Lit (TS, JS):
src/my-element.ts/src/my-element.js - Vanilla (TS, JS):
src/main.ts/src/main.js - Qwik (TS, JS):
src/app.tsx/src/app.jsx(andsrc/routes/index.tsxfor route-based setups)
Shared starter files are copied for every framework (for example src/viewmodels/CounterViewModel.ts).
Template source of truth
Templates are file-based:
packages/create-web-loom/src/templates/shared/**packages/create-web-loom/src/templates/<framework>/<variant>/**
During package build, these are copied to dist/templates/**. Runtime injection uses dist/templates so published binaries remain self-contained.
Framework and variant detection
Framework detection checks generated dependencies in this priority order:
@builder.io/qwiksolid-jspreactreactvuelitsvelte- fallback:
vanilla
Variant detection resolves ts | js from:
typescriptdependency/devDependency, and- scaffold entry file extensions (
.ts/.tsxvs.js/.jsx).
Usage
# npm
npm create web-loom@latest my-app# pnpm
pnpm create web-loom@latest my-app# yarn
yarn create web-loom my-app# bun
bun create web-loom@latest my-appAfter generation:
cd my-app# npm
npm install
npm run dev# pnpm
pnpm install
pnpm dev# yarn
yarn
yarn dev# bun
bun install
bun run devInstalled packages
@web-loom/mvvm-core@web-loom/store-core@web-loom/query-core@web-loom/event-bus-core@web-loom/event-emitter-core@web-loom/signals-core@web-loom/design-core@web-loom/ui-core@web-loom/ui-patterns
If a package is temporarily unavailable on npm, the installer retries one package at a time and skips only unavailable package(s) rather than failing scaffolding entirely.