@stnd/cli
v0.9.0
Published
Standard Garden CLI — scaffold a new garden or a vertical slice
Maintainers
Readme
title: "@stnd/cli" aliases: [] created: 2026-07-04 20:58 modified: 2026-09-16T17:31:37.760Z last_audited: 2026-07-14 audit_interval_days: 90 next_audit: 2026-10-12 audit_priority: 3 maturity: sprout mode: read publish: true status: active tags:
- package
- stnd theme: maker type: package visibility: public garden-url: https://standard.garden/@francis/readme garden-short: https://stnd.gd/DT0h6O permalink: readme
@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 check [path] [options] # Audit components for semantic purity, styles & framework rules
stnd help # Show usage
# aliases: create → new, slice → module, doctor → check, audit → checkstnd 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 formatNames 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 inmodules/pages/.landing: High-impact landing page with Swiss 12-column grid, hero section, features list, and typography specimen inmodules/landing/.blog: Personal blog with articles inmodules/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 + Rollupindex.htmlresolution bug.pnpm devandpnpm buildwork 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).
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 buildmust pass on a machine outside this monorepo. Freeze it astest/desert.test.js. Until publish, the version ranges intemplates/garden/package.jsoncan’t resolve from npm. - [ ] Keep template versions in sync —
templates/garden/package.jsonpins [priority:: 3] [token_scale:: 3] [created:: 2026-07-14] [area:: framework] exact versions forastro,@astrojs/cloudflare,svelte, andwrangler(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. - [ ]
prepublishOnlyruns a real scaffold test, not juststnd 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 slicePublishing
npm version patch # or minor/major
npm publish # publishConfig.access is public; `files` includes templates/