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
<file> is the JSON from Svix’s environment export endpoint.
Options
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.
1 on a read error, an existing workspace, or any conversion problem, with nothing written.
Example
generate and, for future edits, migrate dev.
Continue
Defining events
The language your Svix catalog now lives in.
migrate deploy
Deploy the imported history to an environment.
generate
Emit typed clients from the imported schema.