Skip to content

olef layout

CLI v3.0.2View Markdown

Generated from Olef 3.0.2. All commands · Capabilities and requirements

These entries describe available commands, not a sequence to run. Check prerequisites before changing app, device, or cloud state. Global options are listed in the command catalog.

Agent-first layout snapshots and diffs

Terminal window
olef layout --help

Output: json.

Capture a layout snapshot from the current UI tree

Terminal window
olef layout snapshot --help

Output: json.

Argument Description
--out <OUT> / -o Write JSON to a file instead of stdout
--compose Add Compose nodes (runtime Compose inspector)
--semantics Add Compose semantics and text (slower: reads every parameter)
--source-map Map nodes and elements to project source files
--screenshot Include a screenshot artifact next to the snapshot
--app <APP> App package to inspect instead of the foreground app
--pid <PID> Process id to inspect instead of the foreground app’s
--timeout-ms <TIMEOUT_MS> Budget for Compose parameters and semantics, in milliseconds Default: 8000.
--json Accepted for compatibility; output is always JSON.

Diff two layout snapshot JSON files

Terminal window
olef layout diff --help

Output: json.

Argument Description
<before> Required.
<after> Required.
--json Accepted for compatibility; output is always JSON.

Compose recomposition counters from the runtime’s Compose inspector

Terminal window
olef layout recompositions --help

Output: json.

Argument Description
--reset Reset the counters after reading them
--app <APP> App package to inspect instead of the foreground app
--pid <PID> Process id to inspect instead of the foreground app’s
--timeout-ms <TIMEOUT_MS> Budget for Compose parameters and semantics, in milliseconds Default: 8000.
--min-count <MIN_COUNT> Only return nodes recomposed at least this many times (the full tree of a real screen is hundreds of nodes; --min-count 1 keeps what changed) Default: 0.
--limit <LIMIT> Return at most this many nodes, most recomposed first
--json Accepted for compatibility; output is always JSON.

Resolve a current UI node and map it to source when source mapping is available

Terminal window
olef layout source --help

Output: json.

Argument Description
--id <ID> Element id from screen or layout snapshot
--draw-id <DRAW_ID> Layout node draw id from layout snapshot
--text <TEXT> Match text by case-insensitive substring. Single-target actions prefer a unique full-text match; multiple remaining matches are ambiguous
--rid <RID> Match by resource-id substring; actions prefer a unique exact match
--desc <DESC> Match by content-description substring; actions prefer a unique exact match
--app <APP> App package to inspect instead of the foreground app
--pid <PID> Process id to inspect instead of the foreground app’s
--timeout-ms <TIMEOUT_MS> Budget for Compose parameters and semantics, in milliseconds Default: 8000.
--json Accepted for compatibility; output is always JSON.