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

Synopsis: Print the fields of one object.

Usage

mergeway-cli [global flags] get --type <type> <id>
FlagDescription
--typeRequired. Type identifier that owns the object.
<id>Required positional argument representing the object identifier. For entities that use identifier: $path, this is the relative file path ID, which may include ../... for records loaded from outside the workspace root.

Use --format json if you prefer JSON output.

Example

Run the command from the workspace root. Use --root if you need to target another workspace.

Fetch the post-001 record as YAML:

mergeway-cli --format yaml get --type Post post-001

Output:

author: user-alice
body: |
  We are excited to announce the product launch.
id: post-001
title: Launch Day

For path-based identifiers, the lookup uses the file path instead:

mergeway-cli --format yaml get --type Note data/notes/alpha.yaml

External-root $path records work the same way:

mergeway-cli --format yaml get --type Product ../secondary/products/widget.yaml