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 update

Last updated: 2025-10-22

Synopsis: Modify an existing object. You can replace the object entirely or merge in a subset of fields.

Usage

mw [global flags] update --type <type> --id <id> [--file path] [--merge]
FlagDescription
--typeRequired. Type identifier.
--idRequired. Object identifier to update.
--fileOptional path to a YAML/JSON payload (defaults to STDIN).
--mergeMerge fields into the existing object instead of replacing it.

Example

Run the command from the workspace root (or add --root to target another workspace). Update a post title by merging in a tiny payload:

cat <<'PAYLOAD' > post-update.yaml
title: Launch Day (Updated)
PAYLOAD

mw update --type Post --id post-001 --file post-update.yaml --merge

Output:

Post post-001 updated

Without --merge, the payload replaces the entire object.

Run mw validate after significant updates to confirm references still resolve. Delete the temporary payload file once you are done with the update.



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