CLI Reference

Reference for Mergeway CLI commands, global flags, and usage.

Every command shares a set of global flags (use --long-name; single-dash long flags like -root are not supported). Global flags can appear before or after the command name.

FlagDescription
--rootPath to the workspace (defaults to .).
--configExplicit path to mergeway.yaml (defaults to <root>/mergeway.yaml).
--formatOutput format (yaml or json, default yaml).
--fail-fastStop after the first validation error (where supported).
--yesAuto-confirm prompts (useful for delete).
--verboseEmit additional logging.

Repository setup

Schema utilities

For more information on the schema, please consult the Schema Format

Object operations

Need a refresher on terminology? See the Basic Concepts page.


mergeway-cli config export

Emit a JSON Schema for one of your types.

mergeway-cli config lint

Validate configuration files (including includes) without touching data.

mergeway-cli create

Create a new object file that conforms to an entity definition.

mergeway-cli delete

Remove an object file from the workspace.

mergeway-cli entity list

Show every entity Mergeway discovered from your configuration.

mergeway-cli entity show

Print the normalized schema for a given entity.

mergeway-cli export

Export repository objects into a single JSON or YAML document.

mergeway-cli fmt

Format one or more data/config files using Mergeway’s canonical ordering.

mergeway-cli gen-erd

Generate an entity relationship diagram of your data model.

mergeway-cli get

Print the fields of one object.

mergeway-cli init

Scaffold the directory layout and default configuration for a Mergeway workspace.

mergeway-cli list

List object identifiers for a given type, optionally filtered by a field.

mergeway-cli update

Modify an existing object by replacing it or merging in fields.

mergeway-cli validate

Check schemas, records, and references and report formatted errors.

mergeway-cli version

Display the CLI build metadata (semantic version, commit, build date).