CLI
Every Tostada workflow runs through npm scripts in tostada/package.json and tostada/web/package.json.
Main app — tostada/
| Script | What it does |
|---|---|
npm run dev |
Boot the main app on :5174 (Vite dev server with HMR) |
npm run dev:preview-host |
Boot the preview-host sandbox on :5179 |
npm run build |
Type-check (tsc -b) then production-build with Vite |
npm run preview |
Serve the production build locally for sanity-checking |
npm run lint |
Run ESLint across the codebase |
npm run sync:shadcn |
Re-fetch the component registry — components, demos, blocks, hooks |
You need both dev and dev:preview-host running in parallel for the Components surface to render previews.
Marketing site + docs — tostada/web/
| Script | What it does |
|---|---|
npm run build:docs |
Build the user docs from tostada/docs/**.md into tostada/web/docs/ |
npm run watch:docs |
Same, with file-watching — rebuilds on every .md or .yml change |
The marketing landing page itself is static — no build step. Edit index.html / style.css and refresh.
Common workflows
Local development
# Terminal 1
npm run dev
# Terminal 2
npm run dev:preview-host
After editing user docs
cd web
npm run build:docs # one-shot
# or
npm run watch:docs # if you'll be iterating
Re-syncing component after a registry update
npm run sync:shadcn
# inspect git diff to see new/changed components
Pre-flight check before a commit
npm run lint
npm run build
Coming soon
A unified tostada CLI that bundles these into one entry point is on the roadmap — npx tostada-ui dev, npx tostada-ui sync, etc. Until then, the npm scripts above are the source of truth.