CHAPTER 05

CLI Reference

Run from a site root, or pass --root. Builds fail when doctor reports errors.

Command Ledger REF—CLI / 0.1.0
No. Command Purpose Flags
01 init Scaffold a site from the studio starter. [name]
02 sync Regenerate AGENTS.md, schemas, Cursor skills. -r
03 watch Watch theme/content/public; sync + rebuild. -r --no-build
04 validate Validate TOON/JSON against section contracts. -r
05 doctor Diagnose theme, routes, images; optional JSON. --json --write
06 build Sync → doctor → static HTML in dist/. --skip-sync
07 serve Build and serve locally. -p 4173
08 deploy Write github or netlify recipe files. --force
01

Examples

PowerShell
npx aftercare init my-site
npx aftercare sync --root examples/studio
npx aftercare watch
npx aftercare watch --no-build
npx aftercare doctor --json --write
npx aftercare build --skip-sync
npx aftercare serve --port 3000
npx aftercare deploy github
npx aftercare deploy netlify --force
02

Environment

Base Path

AFTERCARE_BASE_PATH — URL prefix for subpath hosting; overrides config.basePath at build time.

03

Monorepo Scripts

npm run
ScriptRuns
sync:examplesync examples/studio
watch:examplewatch examples/studio
validate:examplevalidate example
doctor:exampledoctor example
build:examplebuild example
serve:exampleserve example