Tooling
Template Sync
Plan, inspect, apply, and rollback Beztack template updates
Template Sync is a Beztack CLI workflow for evolving an existing project as the base template changes, without manually diffing the full repository.
Command overview
Run commands from your workspace root:
pnpm dlx beztack template status
pnpm dlx beztack template plan --to 1.2.0
pnpm dlx beztack template apply --dry-run
pnpm dlx beztack template rollback --snapshot <id>
pnpm dlx beztack template inspect --port 3434Available subcommands:
status: summarize current template state and pending changesplan: generate an update plan and reportapply: apply planned changes (or dry run)rollback: restore files from a snapshotinspect: open local diff viewer for plan changes
Shared flags
--refresh: force refresh of local template cache--offline: use local cache only--host <host>: host fortemplate inspectserver--port <port>: port fortemplate inspectserver
Notes:
--refreshand--offlineare mutually exclusive.- If cache is missing,
--offlinefails until cache is initialized once.
What gets generated
Template Sync writes artifacts in your workspace:
beztack.template.json: manifest with current version and migration historybeztack-sync-report.md: generated plan/apply report.beztack/snapshots/*: rollback snapshots for applied updates.beztack/inspect/*: local inspect viewer files (data.json,index.html)
Typical workflow
- Check current state:
pnpm dlx beztack template status- Create a plan:
pnpm dlx beztack template plan --to <target-version>- Preview apply safely:
pnpm dlx beztack template apply --dry-run- Apply for real:
pnpm dlx beztack template apply- If needed, rollback:
pnpm dlx beztack template rollback --snapshot <snapshot-id>Inspect mode
template inspect starts a local viewer that displays plan metadata,
conflicts, and split diffs between workspace and template content.
pnpm dlx beztack template inspect --host 127.0.0.1 --port 3434Use this when you need a visual review before applying changes.
Safety model
- Apply creates snapshots before mutating files.
- On apply errors, rollback is triggered automatically.
custom-ownedpaths are marked as conflicts and require manual review.
Troubleshooting
- Unknown command: use
pnpm dlx beztack helpand verifytemplatesubcommand. - Cache initialization errors: run once without
--offline. - Unexpected conflicts: run
template inspectand review ownership strategy inbeztack.template.json.