stnd.buildSTANDARD MANUAL2026-07-15

5.2 CLI Reference

Command Line Interface specifications for the Standard Framework.

5.2 CLI Reference

“Manual initialization guarantees human error.” — Standard Technical Directives, 2026

The @stnd/cli package enforces strict project scaffolding and module generation. Bypassing the CLI to manually copy directories or configure files introduces systemic deviations and is expressly forbidden.

1. Initialization (create-stnd)

The core command to bootstrap a new application adhering to the Standard Framework.

npm create stnd@latest my-project

Execution Protocol:

  • Initializes an Astro environment.
  • Configures strict dependency boundaries.
  • Injects the stnd.config.ts configuration file.
  • Establishes the modules/ directory to enforce Vertical Slice Architecture.

2. Module Generation (stnd generate)

To ensure structural uniformity, all new feature slices must be generated via the CLI.

npx stnd generate module <module-name>

Execution Protocol:

  • Creates a dedicated directory under modules/<module-name>/.
  • Scaffolds the mandatory index.module.js manifest.
  • Generates empty ui/api/, and models/ subdirectories.
  • Validates the module ID against existing configurations to prevent namespace collisions.

3. Cache Invalidation (stnd clean)

During development, aggressive caching strategies (Vite, Cloudflare Miniflare) may cause state discrepancies.

npx stnd clean

Execution Protocol:

  • Purges local .astro cache.
  • Purges local .wrangler state storage.
  • Restores the development environment to absolute zero.

Directive: Run this command prior to opening any architectural bug reports.