stnd.build

@stnd/cli

Circle 2 — Application Superpower (Official Extension) · Stable · First-Party

Role: Command-line toolkit (stnd) for scaffolding new Standard projects, running diagnostics, and inspecting modules.

When to use: Bootstrap a new project or run structural checks from your terminal. Full reference at CLI Reference.

Quick Start (TL;DR)

pnpm create stnd@latest my-app
cd my-app && pnpm dev

The stnd scaffolding CLI — bootstrap a new Standard project (digital garden, landing page, or personal blog), or scaffold a vertical slice inside an existing one.

Commands

stnd new <name>                      # Bootstrap a new project (prompts for template if omitted)
stnd new <name> -t <template>        # Specify template: garden, landing, blog, photo
stnd module <name>                   # Scaffold a vertical slice in the current project
stnd check [path] [options]          # Audit components for semantic purity, styles & framework rules
stnd help                            # Show usage
# aliases: create → new,  slice → module,  doctor → check,  audit → check

stnd check

Audits .astro, .svelte, and .html components against Standard framework laws (Single Source of Truth per element, semantic HTML tag purity). Every finding includes a clickable link to diagnostic documentation on stnd.build as well as structured remediation hints for AI agents.

stnd check                           # Audit current directory/project
stnd check --ratchet                 # Enforce ratchet mode (fails on new regressions)
stnd check --update-baseline         # Lock in current violations as the new baseline
stnd check --format=agent            # Emit structured JSON with repair context for AI agents
stnd check --compact                 # One-line per violation format

Names are normalized to a safe kebab-case directory/id ("My Project" → my-project), while the raw name is kept for the project title.

Available Templates

What it produces

stnd new copies the selected template from templates/<template>/ (skipping node_modules, .astro, .turbo, dist, .git), hydrates {{PROJECT_NAME}}, and writes a .gitignore. The result is a fully functional Standard project ready for local dev or edge deployment.

stnd module reads moduleFolder from the garden’s Astro config (default modules) and scaffolds templates/plugin/ as modules/<name>/, hydrating {{id}} / {{name}}. The manifest ships with every hook and route commented out, so a fresh module loads cleanly with zero extra files.

Why output: "server" + Cloudflare? The framework’s Astro 7 workarounds
(in @stnd/core) target the server/prerender/client build paths that the
real apps use. A pure-static garden trips the Astro 7 + Rollup index.html
resolution bug. pnpm dev and pnpm build work locally with no Cloudflare
account; deploy is a separate, opt-in step.

Verified

stnd new → stnd module → astro build produces a garden that prerenders its Markdown pages (/, /about) with Standard typography, a sitemap, and Cloudflare headers. Verified by linking a built app’s node_modules (the @stnd/* packages are not published to npm yet).

Layout

bin/stnd.js               # entrypoint — command dispatch + help
src/commands/
  create-garden.js        # stnd new
  create-module.js        # stnd module
templates/garden/         # the scaffolded project
templates/plugin/         # the scaffolded vertical slice

Publishing

npm version patch   # or minor/major
npm publish         # publishConfig.access is public; `files` includes templates/