repost schema import svix converts a Svix environment export into a complete repost/ workspace: a schema describing the latest version of every event type, and an initial migration that preserves the source's full version history verbatim. The written schema is formatted and validates cleanly, and a generate on it round-trips to the source's schemas.
Usage#
repost schema import svix <file> [options]<file> is the JSON from Svix's environment export endpoint.
Options#
| Option | Description |
|---|---|
--out <dir> | Directory to scaffold repost/ into. Defaults to the current directory. |
What it does#
- Reads and parses the export. A file that isn't a Svix environment export is rejected with the reason.
- Refuses to run if the target
repost/already exists. - Converts every event type: one catalog member and event binding per type, a payload model per schema, snake_case fields renamed to camelCase with
@map, and structurally identical nested models and enums deduplicated. Svix's archived and deprecated flags both become@deprecated. - Anything that cannot be represented losslessly is an error, and the command lists every offender at once rather than the first: event-type names that aren't valid identifiers, names without a
., and unsupported JSON Schema keywords. Names are never changed silently; rename in Svix or edit the export, then re-import.
Exit code 1 on a read error, an existing workspace, or any conversion problem, with nothing written.
Example#
repost schema import svix export.json --out appImported 12 event type(s) from export.json:
4 catalog(s), 9 model(s), 2 enum(s)
Wrote:
app/repost/schema.repost
app/repost/migrations/20260718090000_initReview the schema, then continue with generate and, for future edits, migrate dev.