it2 session subscribe
Subscribe to raw session notifications
Synopsis
it2 session subscribe <session-id> [flags]
Description
Subscribe to low-level session notifications and output raw events.
This is a low-level tool that outputs raw notification data as NDJSON.
For a more user-friendly experience, use 'it2 session monitor' instead.
Supported session-specific event types: [prompt keystroke screen variable escape]
- prompt: Shell prompt changes (requires Shell Integration)
- keystroke: Individual keystrokes
- screen: Screen content updates
- variable: Session variable changes
- escape: Custom escape sequences
Use 'all' to subscribe to all session event types.
The command outputs raw protobuf notifications as compact JSON, one per line.
Use Ctrl+C to stop.
Options
-
--events - Event types to subscribe to: prompt, keystroke, screen, variable, escape, or 'all'
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
- it2 session - Manage iTerm2 sessions