Appearance
Ops scripts
The scripts/ directory — one-off and maintenance tasks. Run them in a shell that has the target env's DATABASE_URL + BUNDLE_S3_* set. For the local dev loop see For contributors · Setup; for base propagation see the runbook.
| Script | Purpose |
|---|---|
migrate.ts | forward-only SQL migration runner |
seed-bases.ts | seed / self-heal the shared base library (bytes + _library rows) |
republish-base.ts | cut a new base version from current code |
rebase-to-latest-base.ts | roll stores onto the latest base (overrides preserved) |
onboard.ts / delete-store.ts | create / hard-delete a store (rows only) |
reset-local.ts | truncate app tables for a fresh local onboarding |
ensure-bucket.ts / ensure-test-db.ts | idempotent object-store bucket / test DB |
gen-themes.ts / gen-tokens.ts / gen-client.ts | codegen (themes, tokens, the typed API client) |
Base propagation is a two-step
republish-base then rebase-to-latest-base — both --apply-gated. See the base propagation runbook for the full flow and the release-freeze warning.