it2 session monitor

Monitor session events in real-time

Synopsis

it2 session monitor <session-id> [flags]

Description

Monitor a session for various events in real-time.

This command subscribes to session notifications and displays them as they occur.
Supported event types:

  • prompt: Shell prompt changes (requires Shell Integration)
  • keystroke: Individual keystrokes
  • screen: Screen content updates

The command will run until interrupted (Ctrl+C).

Options

--events

Event types to monitor (prompt, keystroke, screen)

--follow-prompts

Monitor only prompt events (shortcut for --events=prompt)

--json

Output events as JSON

Options inherited from parent commands

--format (default "text")

Output format (text, json, yaml) - affects how command results are displayed

--timeout

Timeout for API operations - how long to wait for iTerm2 to respond

--url

WebSocket URL for iTerm2 API - typically ws://localhost:1912 for local iTerm2

See Also