Skip to main content

mr note-block update

Replace a block's content payload. Takes the block ID as a positional argument and the new content as --content JSON. The content shape must match the block's type (see note-block types for the default content schema of each built-in type). This command does not touch the block's state, position, or type — use note-block update-state for state changes and note-blocks reorder for position changes.

Usage

mr note-block update <id>

Positional arguments:

  • <id>

Examples

Update a text block's content

mr note-block update 42 --content '{"text":"new body"}'

Update and print the updated record as JSON

mr note-block update 42 --content '{"text":"new body"}' --json | jq .

Flags

FlagTypeDefaultDescription
--contentstring{}Block content JSON (required) (required)

Inherited global flags

FlagTypeDefaultDescription
--jsonboolfalseOutput raw JSON
--no-headerboolfalseOmit table headers
--pageint1Page number for list commands (default page size: 50)
--quietboolfalseOnly output IDs
--serverstringhttp://localhost:8181mahresources server URL (env: MAHRESOURCES_URL)

Output

Updated NoteBlock object with id (uint), noteId (uint), type (string), position (string), content (object), state (object)

Exit Codes

0 on success; 1 on any error

See Also