it2 session lookup siblings

Look up sibling sessions

Synopsis

it2 session lookup siblings [<session-id>] [flags]

Description

Look up all sibling sessions (sessions with the same parent).

Siblings are sessions that share the same parent in the split tree.
This command returns all sessions that have the same parent as the given session,
excluding the session itself.

If no session ID is provided, uses the current session from ITERM_SESSION_ID.
If the session has no siblings, returns empty output.

Examples

Basic Usage

$ it2 session lookup siblings
$ it2 session lookup siblings sess_abc123
# Scripting Example - Broadcast to siblings
$ for sibling in $(it2 session lookup siblings -q); do
$ it2 session send-text "$sibling" "git pull"
$ done

Options

--json

Output result as JSON
-q, --quiet
Only output sibling session IDs (for scripting)

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