Skip to main content
repost schema fmt rewrites .repost files into the canonical format: two-space indentation, aligned field types, and aligned attributes. Formatting is idempotent, and every example in these docs is fmt output.

Usage

The optional path is a .repost file or a directory of them; with none, the discovered schema is formatted.

Options

Behavior and exit codes

In normal mode, files are rewritten and the command exits 0 whether or not anything changed; only a file with syntax errors makes it exit 1, after printing could not format `<file>`: it has syntax errors. In --check mode, any file that would change prints would reformat: <path> and the command exits 1 with <n> file(s) are not formatted, leaving every file untouched.

Examples

In CI:

Continue

validate

The companion correctness check.

Defining events

The language this formatter canonicalizes.

generate

Turn the formatted schema into clients.