Skip to main content
repost schema generate validates the schema and emits every client declared by its generator blocks. With --check it compares instead of writing, which is the CI gate for committed clients.

Usage

Options

What it does

  1. Discovers and validates the schema. Validation errors exit 1; warnings print to stderr and generation continues.
  2. Resolves every generator’s output before writing anything. A missing generator block, an unknown language, a Go or Python generator without output, or two generators resolving to the same directory all abort with nothing written.
  3. Checks the migration history. A fork or a tampered snapshot is a hard error. Unmigrated changes only print a warning telling you to run repost schema migrate dev, and generation continues.
  4. Emits all generators in one atomic transaction. If any output fails, every already-written one is rolled back, so a polyglot schema never ends up half-updated.
Generation only overwrites directories it recognizes as its own output (by the generation marker, or a repost-client- package name for npm outputs). Anything else is refused with nothing written. Exit code 1 on validation errors, misconfiguration, a fork, a checksum mismatch, an overwrite refusal, or --check drift.

Examples

Generate the TypeScript client into node_modules:
Verify committed clients in CI:
On drift, --check exits 1 and lists each changed or stale file per output.

Continue

migrate dev

Record schema changes; it regenerates as part of the run.

Polyglot monorepos

Multi-generator semantics in depth.

migrate status

The companion check for migration health.