stnd.buildSTANDARD MANUAL2026-09-20

@stnd/cli

@stnd/cli

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
stnd module <name>                   # Scaffold a vertical slice in the current project
stnd help                            # Show usage
# aliases: create → new,  slice → module

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

  • garden (default): Digital garden with markdown pages in modules/pages/.
  • landing: High-impact landing page with Swiss 12-column grid, hero section, features list, and typography specimen in modules/landing/.
  • blog: Personal blog with articles in modules/blog/content/posts/, estimated reading time, tag filtering, and book typography.

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 newstnd moduleastro 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).

What’s next — open

Part of the Road to Public Release. Rolls up into the project board.

  • Desert test in CI (Phase 3/4) — once the @stnd/* packages are priority: 3 token_scale: 3 created: 2026-07-14 area: framework
    published, npx @stnd/cli new my-garden && pnpm install && pnpm build must pass on a machine outside this monorepo. Freeze it as test/desert.test.js. Until publish, the version ranges in templates/garden/package.json can’t resolve from npm.
  • Keep template versions in sync — templates/garden/package.json pins priority: 3 token_scale: 3 created: 2026-07-14 area: framework
    exact versions for astro, @astrojs/cloudflare, svelte, and wrangler (manually re-synced 2026-09-05 against the monorepo’s own pins). Nothing enforces this — the release pipeline (Phase 4) should bump them automatically so the CLI never silently drifts back to scaffolding stale versions.
  • prepublishOnly runs a real scaffold test, not just stnd help. priority: 3 token_scale: 3 created: 2026-07-14 area: framework

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/