Skip to content

usm/cli-scaffold-project ​

The usm scaffold-project command generates a starter .usm/ directory for single-app, monorepo-sub, or monorepo-root projects.

Usage ​

bash
# Scaffold a single-app .usm/ structure
usm scaffold-project

# Scaffold a monorepo root .usm/ structure
usm scaffold-project --type monorepo-root

# Scaffold a sub-app in a monorepo
usm scaffold-project --type monorepo-sub --name my-app

Why this exists ​

New projects need an initial .usm/ structure with system, service, and a starter feature. Scaffold-project creates the directory tree and template files based on the project type (single-app, monorepo-sub, or monorepo-root).

How it works ​

Scaffold single-app project (scaffold-single-app) ​

User creates .usm/ for a single application

  1. Setup — project name, org prefix, output directory
  2. Generate — .usm/system.usm with identity block
  3. Generate — .usm/services/<name>.usm with web-app template
  4. Generate — .usm/features/auth/login.usm starter

Guarantees ​

scaffold-project-creates-structure ​

Scaffold-project must create all directories and files without overwriting existing ones

Acceptance criteria:

  • [ ] Creates .usm/ directory tree
  • [ ] Skips existing files (reports ⊘)
  • [ ] Produces valid YAML for each file

Test specifications ​

scaffold-project-single ​

Given:

  • empty_directory: true
  • type: "single-app"

Then:

  • assertion: system.usm, service .usm, and login feature created
  • assertion: all files validate

scaffold-project-mono-root ​

Given:

  • empty_directory: true
  • type: "monorepo-root"

Then:

  • assertion: system.usm plus app service files created

Implementation ​

  • Primary: src/cli/index.ts (scaffold-project command)
  • Test code status: none

See Also ​

  • usm/cli-scaffold