# Command catalog

Source: https://olef.dev/docs/reference/commands

This reference is generated from **Olef 3.0.2**: 374 command entries across 39 groups. It is a release snapshot; your installed CLI is the authority for your version.

## Find a command

Use site search for a command, flag, or task. On your machine, ask the CLI directly:

```bash
olef --version
olef commands --json --depth 1
olef commands --json --describe "ui tap"
olef commands --search "breakpoint" --json
olef commands --guide debugger --json
```

For the response structure, read the [output contract](https://olef.dev/docs/concepts/output-contract). For setup requirements, see [capabilities](https://olef.dev/docs/reference/capabilities).

## Commands A–Z

| Group | What it does |
| --- | --- |
| [`olef app`](https://olef.dev/docs/reference/cli/app) | Application lifecycle, info, and install rituals |
| [`olef appops`](https://olef.dev/docs/reference/cli/appops) | App-ops (allow\|deny\|ignore\|default\|… per operation) |
| [`olef cloud`](https://olef.dev/docs/reference/cli/cloud) | Olef Cloud (invite-only alpha): sign in, link this project, and run its commands on a cloud emulator (`cloud login`, `cloud link`, `cloud status`) |
| [`olef collect`](https://olef.dev/docs/reference/cli/collect) | Gather a self-contained diagnostic bundle (doctor report, device info, recent logcat + crash buffer, and — if an existing server is reachable — screen dump, screenshot, current activity, app info) into a directory |
| [`olef commands`](https://olef.dev/docs/reference/cli/commands) | Emit the full command catalog (machine-readable self-introspection for agents) |
| [`olef config`](https://olef.dev/docs/reference/cli/config) | Inspect, generate, and validate user/project JSON config |
| [`olef connect`](https://olef.dev/docs/reference/cli/connect) | Install the server APK, start it, and verify (disables the stylus tutorial until disconnect) |
| [`olef debug`](https://olef.dev/docs/reference/cli/debug) | Agent-first debug snapshots, timelines, replays, and debugger control |
| [`olef device`](https://olef.dev/docs/reference/cli/device) | Device & system controls (info, shell, power, orientation, clipboard, …) |
| [`olef devices`](https://olef.dev/docs/reference/cli/devices) | List attached devices / emulators, or reserve billed remote ones. `devices catalog\|reserve\|extend\|release\|leases` manage remote devices (preview: Google Cloud Developer Device Platform) |
| [`olef disconnect`](https://olef.dev/docs/reference/cli/disconnect) | Stop the server and remove the port forward |
| [`olef doctor`](https://olef.dev/docs/reference/cli/doctor) | Diagnose (and optionally repair) the host↔device pipe: device state, APK version, port forward, server reachability, UiAutomation owners |
| [`olef emulator`](https://olef.dev/docs/reference/cli/emulator) | List, boot and shut down Android emulators (AVDs) |
| [`olef evidence`](https://olef.dev/docs/reference/cli/evidence) | Correlate UI, network, video and projected application state |
| [`olef fault`](https://olef.dev/docs/reference/cli/fault) | Put the device or app into a failure condition on purpose — process death, no network, full storage, a moved clock, failing backend calls — and undo it reliably. Start with `fault kinds` |
| [`olef feedback`](https://olef.dev/docs/reference/cli/feedback) | Report an Olef bug, missing capability, friction or doc mismatch: drafts locally, the user approves, then it becomes a GitHub issue |
| [`olef files`](https://olef.dev/docs/reference/cli/files) | On-device file operations |
| [`olef init`](https://olef.dev/docs/reference/cli/init) | Initialize host setup: install or update the Claude Code and Codex plugins (asks first) and the agent skill files |
| [`olef lab`](https://olef.dev/docs/reference/cli/lab) | This machine as a device lab for Olef Cloud: `lab register`, `lab add <serial\|ip:port>`, `lab serve`; leased as `lab:<lab>/<device>` |
| [`olef layout`](https://olef.dev/docs/reference/cli/layout) | Agent-first layout snapshots and diffs |
| [`olef licenses`](https://olef.dev/docs/reference/cli/licenses) | Print the Olef License and the notices of the open-source components Olef includes |
| [`olef log`](https://olef.dev/docs/reference/cli/log) | Structured, bounded logcat: app-scoped JSON log lines with crash/ANR blocks parsed out, windowed (`--last 60s`) and deduplicated. Works without the on-device server |
| [`olef mcp`](https://olef.dev/docs/reference/cli/mcp) | Serve the Model Context Protocol over stdio for Claude Code: device control with dp coordinates and image screenshots, plus a live viewer for the Claude Desktop browser pane |
| [`olef net`](https://olef.dev/docs/reference/cli/net) | Network MITM proxy: enable, inspect, intercept, and modify HTTP(S) traffic |
| [`olef pane`](https://olef.dev/docs/reference/cli/pane) | Serve the live, interactive device viewer (video, touch, keys) on a loopback URL until Ctrl-C; or read what the person annotated or recorded in a running viewer |
| [`olef perm`](https://olef.dev/docs/reference/cli/perm) | Runtime permission grants |
| [`olef profile`](https://olef.dev/docs/reference/cli/profile) | Device display profile (animations, font, density, size, rotation) |
| [`olef record`](https://olef.dev/docs/reference/cli/record) | Turn what was done in a session (an agent's commands, a person's viewer input) into a test folder: `record save <name>` cleans up the journal, writes a Bash script of one olef command per step, replays it once from a fresh start, and saves `tests/olef/<name>/` |
| [`olef runtime`](https://olef.dev/docs/reference/cli/runtime) | Attach and manage the in-process runtime in debuggable apps |
| [`olef session`](https://olef.dev/docs/reference/cli/session) | Reserve devices for drivers and provide passive observations to advisers |
| [`olef skill`](https://olef.dev/docs/reference/cli/skill) | Generate, install, or refresh Agent Skills (claude-code / cursor / codex / gemini / antigravity) at user or project scope |
| [`olef test`](https://olef.dev/docs/reference/cli/test) | Run a command that needs the device's single UiAutomation slot (instrumentation tests, `uiautomator dump`, `android layout`): disconnects Olef, runs the given command (stdio inherited), then reconnects (unless `--no-reconnect`). Exits with the command's status |
| [`olef ui`](https://olef.dev/docs/reference/cli/ui) | Live UI automation: dump, find, tap, type, and wait for screen state |
| [`olef update`](https://olef.dev/docs/reference/cli/update) | Check for a newer release and print the command that updates this install (Homebrew, Scoop or the installer). Never changes anything |
| [`olef usage`](https://olef.dev/docs/reference/cli/usage) | Opt-in local usage log (verb + duration + error code per invocation; never argument values, never leaves this machine) |
| [`olef verify`](https://olef.dev/docs/reference/cli/verify) | Plan verification and inspect test evidence with explicit coverage |
| [`olef video`](https://olef.dev/docs/reference/cli/video) | Screen-record a device into a timestamped, crash-safe evidence bundle |
| [`olef watch`](https://olef.dev/docs/reference/cli/watch) | Watch the app timeline: UI changes, crashes, toasts, watchers, and network events when available |
| [`olef why`](https://olef.dev/docs/reference/cli/why) | One bounded triage read: what just went wrong? Fuses the last crash/ANR, recent error logs, the current screen, and network failures into a verdict with evidence and next steps |

## Global options

Global options apply across commands. Use `olef --help` to see the complete help for your installed release.

| Option | Description |
| --- | --- |
| `--authority-dir` | Shared same-host ownership directory. All cooperating clients must use the same authority |
| `--device` | ADB serial. Defaults to $OLEF_DEVICE / $ANDROID_SERIAL / sole attached device |
| `--target` | Named project device target (for example `mobile` or `tv`). Resolves a configured stable AVD name or physical serial. An explicit --device takes precedence |
| `--takeover` | Reassign an AVD target currently claimed by another project. This is an explicit isolation override and has no effect on direct --device use |
| `--lock-timeout-ms` | Wait up to this many milliseconds for a device, lifecycle or named-AVD resolution lock held by another command. Use 0 to fail immediately. Default: 2000, or 15000 for read verbs (`ui dump`, `ui wait`, …) so parallel reads queue behind a running command |
| `--server-apk` | Olef's own device server from a local build, instead of the release's (not your app's APK): the server's test APK (app-debug-androidTest.apk, with the main APK found beside it), or a directory holding both. `--apk` and $OLEF_APK still work |
| `--any-apk-version` | Skip the version check when installing — assume any provided/discovered APK is the right one. Implied by --server-apk; you only need this explicitly to override the cached download flow during local development without it |
| `--project-root` | Path to an app's source project (Gradle root). Maps layout nodes and debugger locations to files and is surfaced by `doctor`. Defaults to the `project` field in config |
| `--quiet` | Silence Olef's own operational logs (the `tracing` lines written to stderr) so command output on stdout stays clean — handy when piping with `2>&1` or for the tidiest agent output. Real errors are still reported, and an explicit `RUST_LOG` still takes precedence |
| `--redact` | Redact common secrets, PII, identifiers, and configured patterns from supported JSON/text output and diagnostic artifacts. Video applies it to marker labels; recovery identifiers and MP4 pixels remain sensitive |

## Session options

Place these root options before the command, for example `olef --session-file session.token ui dump`.

| Option | Description |
| --- | --- |
| `--session` | Driver token returned by session open or handoff; required for a reserved device. Pass it before the subcommand (`olef --session TOKEN ui dump`) |
| `--session-file` | Read the driver token from a private file created by session open/handoff --token-out |

## Machine-readable reference

Download the [command catalog JSON](https://olef.dev/docs/commands.json), [shared metadata](https://olef.dev/docs/shared.json), or the [documentation index](https://olef.dev/docs/llms.txt). Use `olef commands <path> --json --full` for full invocation contracts and argument constraints.
