CLI reference
The executable is escope. Download a CLI ZIP from GitHub Releases, extract it, and add the executable directory to PATH. Installation and a first session are covered in Quick start.
Global options
Global options can appear before a subcommand. preserve uses the underlying port opener's policy; on asserts DTR and off clears it. A line change can affect reset behavior according to the board. See Connection.
devices
Enumerates serial ports without opening them. The JSON array contains:
Absent metadata is null. The USB interface is the CDC communication interface on Linux/Windows and the data interface on macOS. Enumeration does not perform an Agent handshake.
simulate
--listen defaults to 127.0.0.1:9337. The software reference device supplies synthetic pixels/metrics and a 320 × 240 counter screen. Output identifies the endpoint and physical_device: false. Counter state persists across connections until server restart. Ctrl-C stops the server.
info
Returns device identity, negotiated session information, and human-readable capabilities. Identity includes name, model, firmware, build, boot, and uptime. Hello and Info require no optional capability bit.
logs
Finite reads apply --timeout-ms while waiting for each next matching record. Follow mode can remain idle and checks disconnection. The CLI subscribes locally before starting device logs, then unsubscribes on a normal stream exit.
Records include session, sequence, boot-relative timestamp, level, target, message, device dropped, and truncated. A host broadcast gap emits an object with type: "host_log_gap" and dropped. These losses have separate sources.
metrics
Unavailable optional fields remain null. Memory is measured in bytes. Frame timing, queue, and minimum-free scope are platform-defined. The interval is a delay after a sample; it does not establish a hard sampling frequency.
ui tree
Traverses a consistent nonzero revision. The SDK attempts up to three traversals after Stale and validates IDs, cursors, parent paths, and a 4096-node limit. Text output lists ID, parent, kind, geometry, and name. JSON retains all host node fields, including flags and revision.
display capture
Retrieves one fixed frame, releases the device capture, and saves a new PNG. Success reports path, width, height, frame ID, and session. File creation rejects an existing path. The parent directory must exist.
input tap
Coordinates are u32 logical display pixels. --hold-ms defaults to 60 and accepts 1…5000. The platform validates coordinates and translates the tap to input. Success reports accepted: true, coordinates, duration, and session; it does not confirm rendering or navigation completion.
A timeout can occur after the action executes. The SDK does not automatically replay input.
crash show
Reads present, reason, build ID, message, and boot ID from the platform's retained summary. It does not induce a crash or perform ELF symbol resolution.
diagnose
--output is required and must name a new directory with an existing parent. --logs defaults to 8 and accepts 1…1000.
Schema 1 report.json includes endpoint, captured_at_unix_ms, hello, capabilities, info, supported results, corrupt_frames, complete, and issues. A successful capture writes screen.png, with metadata in display.
Missing capabilities are skipped without making complete=false. Metrics, tree, crash, and capture request failures can be recorded in issues while collection continues. Identity, log subscription/unsubscription, decode, or filesystem failures can terminate the command before its final report.
Diagnosis logs use level 5 with a fixed three-second wait per record. That wait is independent of global --timeout-ms. Samples are collected sequentially; the report does not establish an atomic tree/display/metrics snapshot.
Output and exit behavior
With --json, successful finite results go to stdout as compact JSON, and log/metric streams emit one object per line. Operational failures go to stderr as {"ok":false,"error":"…"} and exit with status 1. Argument errors and help use clap's own output and exit conventions.
Without --json, most structured results are pretty-printed JSON; ui tree uses its text listing. Remote rejections are reported as errors, including Unsupported for absent capabilities. See Protocol 1 for status values and Host SDK for error variants.
One process uses a physical serial port at a time. Stop a follower, monitor, or Inspector before another process connects; concurrent operations within one SDK Session share its connection.