nodes:stage:lease:acquire

Take an edit lease on an existing node for the MCP staged-payload workflow. The lease only gates the MCP tool flywheel_commit_node: the CLI has no command that commits a staged payload, and hosted: and repo: edits do not check it. It lasts 45 seconds by default, so refresh it with nodes:stage:lease:heartbeat about every 15 seconds. Refused with 409 when another session holds a live lease or the base revision is stale; once a lease has expired, acquiring again takes a new one. Running it again with the same --stage_session_id extends the lease and moves it to the --base_committed_revision you send, so after another write to the node, re-run it with the node's new revision. Prints `lease` (with `expires_at` and `heartbeat_interval_seconds`) and the current `node`.

Reference for flywheel nodes:stage:lease:acquire.

Command Group

Nodes & Graph Commands

Summary

Take an edit lease on an existing node for the MCP staged-payload workflow. The lease only gates the MCP tool flywheel_commit_node: the CLI has no command that commits a staged payload, and hosted: and repo: edits do not check it. It lasts 45 seconds by default, so refresh it with nodes:stage:lease:heartbeat about every 15 seconds. Refused with 409 when another session holds a live lease or the base revision is stale; once a lease has expired, acquiring again takes a new one. Running it again with the same --stage_session_id extends the lease and moves it to the --base_committed_revision you send, so after another write to the node, re-run it with the node's new revision. Prints lease (with expires_at and heartbeat_interval_seconds) and the current node.

Effect

changes data

Usage

flywheel nodes:stage:lease:acquire <FLAGS>

Required flags

FlagValueDefaultChoicesDescription
--node_idstringNode UUID (not a slug) from node_id in hosted:node:list or graph:get. Missing or hidden: 404 where the command loads it.
--stage_session_idstringYour own ID for this edit session: any string you choose, sent unchanged on acquire, heartbeat, release and the commit. It owns the lease; another session's live lease is refused with 409 node has active stage lease.
--base_committed_revisionintegerCommitted revision your edit starts from: hosted:node:get revision to acquire, then the lease's base_committed_revision. Committed since: 409 stale committed revision; re-read and start over.

Optional flags

FlagValueDefaultChoicesDescription
--formatFORMATjson, tsv, csv, tableOutput format for command results.
--envPROFILESelect a CLI profile; unconfigured default requires FLYWHEEL_BASE_URL.
--outPATHWrite output to a file path, or use - for stdout.
--openOpen browser-bound URLs when supported.
--no-retryDisable transient-error retries.
--retry-maxNMaximum transient-error retry attempts.
--waitBlock on async operations until a terminal state is reached.
--wait-timeoutSECONDS600Seconds to wait for --wait before timing out. Defaults to 600.
--allow-selfAllow mutating the currently active credential.
--timeoutSECONDSSet the per-request timeout budget in seconds.
--idempotency-keyKEYReuse an Idempotency-Key so ambiguous write failures can be retried with the same key.
--forceForce safety-gated operations where supported.
--yesConfirm forced compute:release-all --force. Other runtime commands do not read --yes.
--debugPrint structured request debugging with secrets masked.
--verbosePrint verbose progress for long-running operations.
-h, --helpShow this help.

Examples

Take a lease before an MCP flywheel_commit_node edit.

flywheel nodes:stage:lease:acquire --node_id n_abc --stage_session_id session-1 --base_committed_revision 7

Acquire a lease using the --key=value long form.

flywheel nodes:stage:lease:acquire --node_id=n_abc --stage_session_id=session-2 --base_committed_revision=12

Output

Default format: json.

FieldType
leaseobject
nodeobject