pnpm upgrade-app
Re-apply template improvements to an app you scaffolded earlier, without clobbering your edits. Every scaffold records a baseline in .scaffold.json (the original inputs + a SHA-256 of every stamped file); upgrade re-scaffolds those same inputs against the current templates and does a three-way merge.
pnpm upgrade-app my-app --dry-run # preview
pnpm upgrade-app my-app # apply
What happens per file
- Template changed + you never touched it → updated automatically.
- Template changed + you edited it → conflict: the new version is written as <file>.upgraded, yours is kept. Review, merge, delete the .upgraded copy.
- Template unchanged → left alone (your edits are always safe).
- New template file → added. File removed from the template + untouched by you → removed.
- After applying, the baseline is re-stamped so the next upgrade compares correctly.
Only apps scaffolded after 2026-07-21 carry a .scaffold.json and can be upgraded. Run pnpm exec tsc --noEmit afterwards, then commit.
Built-in demos re-read the CURRENT spec (that IS the upgrade); file/inline specs replay the recorded one. --fields/--table/--labels re-apply on top for built-ins. Use --json for a machine-readable summary of updated/added/removed/conflicts.