Skip to main content

Listener

Subscribe to network interception streams, manage active listeners, and unsubscribe.

otto listener subscribe-network​

Subscribes to a network interception listener on a managed tab, streaming captured HTTP responses.

Usage​

otto listener subscribe-network [options]

Flags​

FlagShorthandRequiredTypeDefaultAllowed valuesDescription
--tab-sessionYesstringTab session ID to attach the listener to
--site-sYesstringSite scope (e.g. reddit.com) — validated against tab URL
--patternNostring[]URL glob patterns to capture (repeatable)
--request-hostNostring[]Explicit cross-host allowlist (repeatable)
--modeNostringnetworknetwork, fetch, hybridInterception capture mode
--include-bodyNobooleantrueInclude response body in updates
--include-headersNobooleanfalseInclude response headers (sensitive headers redacted)
--max-body-bytesNonumber256000Maximum response body bytes to capture
--mime-typesNostring[]MIME prefix allowlist (repeatable)
--node-idNostringAuto-selectedTarget node ID
--jsonNobooleanfalseOutput stream updates as NDJSON

Examples​

# Basic network subscription for Reddit API traffic
otto listener subscribe-network \
--tab-session <tabSessionId> \
--site reddit.com \
--pattern 'https://www.reddit.com/api/*'

# High-volume capture with body limit
otto listener subscribe-network \
--tab-session <tabSessionId> \
--site reddit.com \
--request-host matrix.redditspace.com \
--pattern 'https://matrix.redditspace.com/_matrix/client/v3/*' \
--mode network \
--max-body-bytes 200000

# Hybrid capture with headers and JSON output
otto listener subscribe-network \
--tab-session <tabSessionId> \
--site reddit.com \
--mode hybrid \
--include-headers \
--json

Stream output​

Each captured response is emitted as a listener_update frame. The stream continues until:

  • otto listener unsubscribe is called with the subscribe requestId
  • The tab session closes
  • Ctrl+C is pressed (sends unsubscribe automatically)

The subscribe requestId is printed on start — save it to unsubscribe later from another terminal.

Exit codes​

CodeMeaning
0Subscribed and streaming
1Subscription failed (invalid tab session, site mismatch, etc.)

otto listener unsubscribe​

Unsubscribes an active network listener by its subscribe requestId.

Usage​

otto listener unsubscribe [options]

Flags​

FlagShorthandRequiredTypeDefaultDescription
--target-request-idYesstringThe requestId returned by subscribe-network
--node-idNostringAuto-selectedTarget node ID

Examples​

otto listener unsubscribe --target-request-id <subscribeRequestId>

Exit codes​

CodeMeaning
0Unsubscribed successfully
1Listener not found or relay error

otto listener list​

Lists active network listeners on the connected node.

Usage​

otto listener list [options]

Flags​

FlagShorthandRequiredTypeDefaultDescription
--node-idNostringAuto-selectedTarget node ID
--jsonNobooleanfalseOutput as JSON

Examples​

otto listener list

otto listener list --json

Exit codes​

CodeMeaning
0Listeners listed
1Relay or node error