Retained attachment memory uses exact history and memory revisions plus nextStart, rather than a session cursor. Both revisions are rechecked on every read, including a new command. Upload IDs remain connection-local. Repository nextCursor values belong to the same run connection. Repeat the exact file/source or repository/view selectors; a different session, changed source, privacy or editor version refuses continuation. Use --json when another program will read a command’s result:
Use a JSON file with apply, or send the file through standard input:
The pipe example uses a macOS/Linux shell. In PowerShell, use Get-Content -Raw changes.json | flowjoe-cli apply - --autoapprove --json. Passing the filename directly works on all three platforms.

Run several actions together

Save an array of steps in steps.json. Each step names an action and can supply an input object:
Actions run in order using one connection. The list stops at the first failed action or rejected approval. Earlier completed changes remain applied. A list is not one all-or-nothing change; put related edits in one apply request when they need to succeed together. Add --autoapprove to skip approval cards for the entire list, including deletions. Without that option, the command waits for approval in FlowJoe whenever an action needs it.

Use an earlier result

Give a step a saveAs name, then use {"$result":"name","path":[...]} in a later input. The path selects fields from the first JSON text result returned by the earlier action. If it has no JSON text result, the path starts at the complete action response. This example uploads the text “Hello”, prepares it as a document, then places it in a node. Replace YOUR_NODE_ID with a node ID from show:
The final step asks FlowJoe to place the prepared document in the gallery. Approve that request in the app, or run the list with flowjoe-cli run steps.json --autoapprove to skip the card. Read actions stage_media and the current change catalog when adapting the example to other content. Result references may select array items using a numeric path element. Names must start with a letter and be unique within the list. Uploaded files, recent-change history, undo and retained-history cursors belong to the connection that created them. They are cleared when the command ends. A later terminal command gets a new connection and cannot reuse those uploads or undo the earlier command’s edit. Retained chat/image/transcript/version history is separate from connection-local change history. Use query_history and read_history for retained records; keep their query/read/continuation steps in one run list. A new CLI command cannot resume a previous connection’s cursor. Use one run list for upload → prepare → place workflows, or for an edit followed by undo_last_change. Undo still refuses if the Flow changed after that connection’s last edit. This prevents a script from undoing someone else’s later work. If a command stops waiting, loses its connection or is interrupted, earlier completed steps are not rolled back. The CLI never automatically repeats a failed edit request. Read the result and check FlowJoe before running the list again.