Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

mw export

Last updated: 2025-10-22

Synopsis: Export repository objects into a single JSON or YAML document.

Usage

mw [global flags] export [--output <path>] [entity...]
FlagDescription
--outputOptional 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:

mw export

Export only the User and Post entities as JSON into a file:

mw --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.

  • mw list — inspect available identifiers before exporting.
  • mw get — fetch a single object instead of the full dataset.


Generated at 2025-10-30 22:44:13 (commit: 3a1f254)