# Embedded oh-router CLI reference

`Oh.app` bundles `oh-router` at `Oh.app/Contents/Helpers/oh-router` and links `~/.local/bin/oh-router` from **Help → Use with Coding Agents…**. Pass `--json` to any command for structured JSON output.

Canonical URL: https://oh.computer/docs/cli

## Global flags

| Flag | Description |
| --- | --- |
| `--json` | Emit structured JSON on `stdout` (accepted before or after the subcommand). |
| `--socket <PATH>` | Override control socket path (default `$OH_CONTROL_SOCKET` or `~/.local/state/oh/ohd/ohd.sock`). |
| `--event-socket <PATH>` | Override hook event socket path (default `$OH_EVENT_SOCKET` or `~/.local/state/oh/ohd/events.sock`). |
| `--state-dir <DIR>` | Override daemon state directory (default `$OH_STATE_DIR` or `~/.local/state/oh/ohd`). |
| `--config-dir <DIR>` | Override router config directory (default `$OH_ROUTER_CONFIG_DIR` or `~/.config/oh-router`). |
| `-V`, `--version` / `-h`, `--help` | Print version or command usage. |

## Daemon and session supervision

| Command | Description |
| --- | --- |
| `oh-router version` | Print CLI and RPC protocol version. |
| `oh-router daemon <start\|stop\|status\|setup-hooks> [--http-port <PORT>] [--write]` | Start, stop, or check `ohd`, or install Claude Code lifecycle hooks (`setup-hooks --write`). |
| `oh-router spawn [--project <NAME>] [--cwd <DIR>] [--kind claude\|codex\|shell] [--tier opus\|sol\|fable\|astra] [--effort low\|medium\|high\|max] [PROMPT...]` | Spawn a routed session in `ohd` (`--review`, `--headless`, `--plugin-builder`, `--profile <ID>`, `--device <ID>`). |
| `oh-router claude [OPTIONS] [PROMPT...]` | Spawn a Claude Code session (`Opus` or `Fable`). |
| `oh-router codex [OPTIONS] [PROMPT...]` | Spawn a Codex session (`Sol` or `Astra`). |
| `oh-router ps [--project <NAME>] [--json]` | List active and recent supervised sessions. |
| `oh-router inspect <SESSION_ID> [--json]` | Inspect a session's state, turns, queued prompts, and 2D VT screen lines. |
| `oh-router steer <SESSION_ID> [--mode auto\|now\|queue\|interrupt] <PROMPT...>` | Send or queue a prompt through the 2D VT screen guard. |
| `oh-router switch <SESSION_ID> [--tier opus\|sol\|fable\|astra] [--effort low\|medium\|high\|max] [--profile <ID>]` | Switch a session's model tier, reasoning effort, or workspace profile. |
| `oh-router action <SESSION_ID> <approve\|deny\|trust_folder\|ctrl_c\|stop>` | Apply an explicit dialog action or stop a session. |
| `oh-router queue <list\|add\|remove\|move\|clear\|flush> <SESSION_ID> ...` | Inspect, append, reorder, clear, or flush a session's FIFO prompt queue. |
| `oh-router hook [<Event>]` / `oh-router statusline-bridge [--passthrough <CMD>]` | Forward Claude Code hook events and status-line telemetry to `events.sock`. |

## Profiles, policy, devices, and Vercel Board

| Command | Description |
| --- | --- |
| `oh-router profiles <list\|add\|login\|probe\|redeem-reset>` | List workspace profiles, add `--provider claude\|codex --id <ID>`, sign in, probe quota windows, or redeem an earned reset. |
| `oh-router policy <get\|set\|plugin-spec>` | Read or update routing preferences (`--interactive-provider`, `--headless-provider`, `--pin <project=tier>`) or print the `PolicyAdvisor` spec. |
| `oh-router devices <list\|pair-command\|recipe\|ssh-config\|add-remote\|toggle-stream\|tunnel-start\|tunnel-stop>` | Manage paired hosts, generate Cloudflare Tunnel and OpenSSH `ProxyCommand` recipes, or start/stop the scoped loopback bridge. |
| `oh-router board <status\|connect\|sync\|subscribe\|tasks\|create-task\|claim\|block\|complete\|thread\|reply>` | Connect `@vercel/board`, list or create tasks, claim with an active lease, and read or reply to threads. |
| `oh-router worker <--once\|--loop> [--channel <CH>] [--project <NAME>] [--interval-ms <MS>]` | Run the lease-backed task claim and renewal worker. |
