User guide · Leave

Leave cleanly

Leaving isn't an export job, because there's nothing to export — the mirror commit keeps a complete, buildable copy of every string in your repo, and it's on by default. Ejecting removes stet and keeps your words.

Everything here works self-hosted and on Cloud alike; Cloud adds CSV/JSON export for anything that lives in a database.

01Confirm the snapshot is complete

check verifies the committed snapshot against the registry as a set — every key accounted for, offline.

$ npx stet check

02Eject

Run it bare and nothing happens yet — eject prints its plan first: every accessor call it will reverse, every file it will delete, and a closing line naming what stays in your repo — your content, your config, your migration history. --write applies the plan. Your components keep rendering the committed values, and the site builds with stet gone.

On a plain HTML site, eject takes every mark out of your pages and the text stays as it reads now.

$ npx stet eject
eject: plan only (pass --write to apply)
src/pages/index.tsx: un-rewrite
⋮
un-rewrite: 3 accessor call(s) reversed across 2 file(s)
delete src/lib/content.ts
stays (no stet imports): stet.config.json, content/descriptor.json, content/defaults.json, content/keys.ts, stet/migrations/
snapshot: 11 default key(s) → content/defaults.json, + content/defaults.ts
drop the stet dependency from package.json
$ npx stet eject --write

03Contacts, if you have them

The contact list never enters git — it lives in a database. Self-hosted, that database is already yours. Leaving Cloud, the list exports as CSV or JSON, and moving to your own Postgres takes three steps: set your connection string, run stet upgrade --store pg, then paste the store block it prints into stet.config.json.

$ npx stet upgrade --store pg