mergeway-cli export
Export repository objects into a single JSON or YAML document.
Synopsis: Export repository objects into a single JSON or YAML document.
Usage
mergeway-cli [global flags] export [--output <path>] [entity...]
| Flag | Description |
|---|---|
--output | Optional path to write the exported document. Defaults to STDOUT. |
entity... | Optional list of type names to include. Omitting the list exports every entity defined in the workspace. |
The export format matches the global --format flag (yaml by default).
Examples
Export every entity in the repository as YAML to the terminal:
mergeway-cli export
Export only the User and Post entities as JSON into a file:
mergeway-cli --format json export --output snapshot.json User Post
Each top-level key in the output map is the entity name; the value is an array of records sorted by ID.
If the schema declares read-only fields derived from the backing file path, those fields appear in the exported payload.
Entities that use identifier: $path can also be exported when their include paths point outside the workspace root. In that case the record IDs and any declared path-derived fields still resolve from those external file paths, including ../... when needed.
Related Commands
mergeway-cli list— inspect available identifiers before exporting.mergeway-cli get— fetch a single object instead of the full dataset.