droboticflow-new/docs/drosync/cli-reference.md
2026-07-28 20:43:46 +08:00

2.0 KiB

CLI reference

Global flags:

  • --json: one JSON value on stdout.
  • --non-interactive: never open or wait for an interactive approval flow.

Commands:

Command Purpose
configure --server URL Persist the control-plane URL through daemon IPC.
auth --server URL [--profile NAME] Start short-code pairing and store the resulting device token in the OS credential store.
mapping list List local mappings.
mapping add ROOT --space ID [--remote-prefix P] [--include-hidden] [--require-done] Add a mapping.
mapping remove ID Remove a mapping without deleting local or remote objects.
plan ID Scan, upload a paged manifest, wait for the asynchronous plan, and retain the resumable session without uploading bytes.
sync ID [--dry-run] Resume a planned/crashed session or execute scan through final commit.
status Show daemon, mappings, and local crash journals.
conflicts List locally known kept_both results.
retry ID Resume a mapping after a retryable failure.
abort SESSION_ID Abort the server session; business objects already committed remain.
doctor Check SQLite, IPC, device credential, control plane, and scoped capabilities.
daemon --foreground Run a foreground per-user daemon.
update Check/pin/pause/rollback signed client releases.
version Print client, protocol, platform, and architecture.

Exit codes:

Code Meaning
0 Success.
2 CLI usage or invalid local configuration.
10 Authentication or credential revoked.
20 Permission/scope/capability gate denied.
30 Conflict or active lease; retry according to the error.
40 Local filesystem/SQLite integrity failure.
50 Network, server, BOS, or otherwise unclassified operation failure.

The implementation emits structured server code/message/retryable/requestId/details errors. Automation should prefer --json and the stable error code over translated text.