@webjsdev/cli
v0.10.58
Published
The CLI for WebJs, a full-stack JavaScript framework built on web components with server-side rendering and no build step. Runs the dev and production servers, scaffolds apps, validates conventions, and drives the database. Node 24+ or Bun.
Readme
@webjsdev/cli
CLI for webjs: scaffold, develop, build, and run webjs apps.
Installing this package gives you the webjs command.
Install
Install once, globally:
npm i -g webjsdevThen scaffold a new app anywhere:
webjs create my-app
cd my-app && npm run dev
# → http://localhost:8080One-shot without a global install, two ways:
# Preferred: the npx-discoverable scaffolder
npx create-webjs-app@latest my-app
cd my-app && npm run dev
# Or via the CLI's npx entry directly
npx @webjsdev/cli create my-app
cd my-app && npm run devBoth webjs create and create-webjs-app auto-install dependencies in the new directory using your detected package manager (npm / pnpm / yarn / bun). Pass --no-install to opt out.
Commands
webjs create <name> # scaffold a full-stack app (default; auth ships as a gallery card)
# <name> must be a valid package name: letters, digits,
# and - . _ , starting with a letter or a digit
webjs create <name> --template api # backend-only API app (routes + modules + Drizzle)
webjs dev # dev server with live reload (runs webjs.dev.before, e.g. webjs db migrate, then serves; npm run dev is a thin alias)
webjs start # production server (no build step, serves source directly)
webjs check # validate source-code conventions (CI gate)
webjs doctor # verify the project/toolchain setup (per-check severity via webjs.doctor.gate, so CI can gate a subset)
webjs test # run server + browser tests
webjs ci # local CI: run the webjs.ci step list in package.json (check, doctor,
# typecheck, audit, every test layer), one result line per step;
# --only <title>, --fail-fast, --json, --signoff (gh signoff after a green run)
webjs create <name> --skip-ci # omit the GitHub workflow (the local ci list always ships)
webjs vendor pin [--download] # pin client deps to a committable importmap (offline/reproducible)
webjs db <generate|migrate|push|studio|seed> # drizzle-kit passthrough (+ seed) by default; a package.json webjs.db block maps any verb to your own ORM's command
webjs ui init # initialise @webjsdev/ui in this project
webjs ui add <names...> # copy components from the registry (https://webjs.dev/ui/registry/<name>.json)
webjs ui list # list every component available in the registrywebjs ui proxies to @webjsdev/ui,
an AI-first component library + CLI that copies sources into your project: class
helpers (buttonClass, cardClass, …) for the visual primitives and a small set
of stateful custom elements (<ui-dialog>, <ui-tabs>, <ui-popover>) where
state matters. The package is a hard dependency of @webjsdev/cli, so installing
the CLI gives you webjs ui automatically. See
https://webjs.dev/ui for the catalogue.
Scaffolded templates
The scaffold seeds opinionated defaults so AI agents produce consistent code:
AGENTS.md+CONVENTIONS.md+.agents/skills/webjs/(single cross-agent source of truth).agents/rules/workflow.md&.claude/protective hooks- A
webjs.cistep list inpackage.json(npm run ci, local CI) and a one-job GitHub workflow that runs the same list test/<feature>/(with optionalbrowser//e2e/subfolders per kind) with example tests- Tailwind CSS via CLI (no browser runtime at build time)
- TypeScript,
.editorconfig,.gitignore
See the full framework docs at https://github.com/webjsdev/webjs.
License
MIT
