CLI Reference
Manage pages, validate schemas, preview renders, and build โ all from the terminal.
Installation
Stackwright CLI comes bundled with @stackwright/cli. If you scaffolded with launch-stackwright, it's already installed.
Page Commands
Create, list, and manage pages in your Stackwright site.
Validation
Validate page YAML against Zod schemas before building. Catches errors early.
Theme Management
Preview and switch between themes. Custom themes are defined in stackwright.yml.
Rendering & Preview
Render pages to screenshots for visual verification. Used by the Otter Raft for iterative design.
Build & Deploy
The prebuild step processes YAML into JSON. Then Next.js handles the rest.
Quick Reference
page add <name>
Create a new page with directory and content.yml
page list
List all pages in the current project
validate [file]
Validate page YAML against Zod schemas
render <path>
Screenshot a page for visual verification
theme list
List available built-in and custom themes
build
Prebuild YAML โ JSON, then Next.js production build
Ready to Build?
Start with the Getting Started guide or let the Otter Raft handle it.