Skip to content
Connect an agent

Command reference

plotwork board edit

Change a tab with typed edit operations, which the board rebases on the current source. It is a command of the Plotwork command line, the npm package @buun_group/plotwork.

TL;DR

QuestionAnswer
What does it do?Change a tab with typed edit operations, which the board rebases on the current source.
How do I run it?npx -y @buun_group/plotwork@0.2.0 board edit, or plotwork board edit once the package is installed.
What does it write?Nothing on this machine.
Does it use the network?Yes: calls to the Plotwork API with the key in PLOTWORK_API_KEY, which is never printed.
Does it read the repository settings?No.
How do I read this in a terminal?plotwork board edit --help

Synopsis

sh
plotwork board edit <board> <tab> [--op <json>] [--rename <old=new>] [--set <target.option=value>] [--add-node <id[:type][=label]>] [--add-edge <from->to[=label]>] [--remove <target>] [--remove-edge <from->to>] [--base-version <n>] [--revision <id>] [--json]

What it does

Sends edit operations, applied in the order the flags are typed: --op takes any operation as edit_diagram takes it (rename, set, add_node, remove, add_edge, remove_edge, move, replace_text), and the other flags write the common ones. Each flag may be repeated.

Operations name their targets by id or label, so the board applies them to the current source even when someone changed the tab since; if any does not apply, none is kept and each result says why.

A board is named by its id, its address in the portal (an address with #tab-<id> also names the tab), or its name; a tab by its id or its name. A name costs one more call to look it up.

Options

OptionDefaultWhat it does
--op <json>OffOne operation as JSON, such as {"op":"move","target":"cache","into":"backend"}.
--rename <old=new>OffRename an id, everywhere it is used.
--set <target.option=value>OffSet an option, such as api.tone=accent or header.theme=dark; an empty value removes it.
--add-node <id[:type][=label]>OffAdd a node, such as cache:database=Redis.
--add-edge <from->to[=label]>OffAdd an edge, such as 'api->cache=reads', quoted so the shell does not read >.
--remove <target>OffRemove a statement by its id or label, with the edges that use it.
--remove-edge <from->to>OffRemove an edge, such as 'api->db', quoted.
--base-version <n>the version read firstThe version the operations were written against.
--revision <id>mainA revision of the tab to work on instead of main.
--jsonOffPrint one JSON document: the API's answer when it worked, or { "error": true, "errorCode", "message", "hint", "status" } when it did not.

Examples

Rename a node and add a cache, in one version.

sh
plotwork board edit Checkout Payments --rename api=gateway --add-node cache:database=Redis

Any operation as JSON.

sh
plotwork board edit Checkout Payments --op '{"op":"move","target":"cache","into":"backend"}'

Exit codes

CodeWhen
0The board kept the change.
1The API refused the call (its code, words and a hint are printed), or could not be reached.
2A mistake in the command line: an unknown option, a missing operand, a file or glob that matches nothing, or a settings file that cannot be read. Also when PLOTWORK_API_KEY is missing or refused, or a flag cannot be read as an operation.

See also

DocWhy
Command referenceEvery command of the command line
Live whiteboardsBoards, tabs, revisions and who may change them
From the command lineSigning in, pull and push, conflicts, and watch
Claude Code pluginThe board and board-sync skills
Exit codes and output formatsWhat every code and format means