it2 window
Manage iTerm2 windows or navigate to window context
Synopsis
it2 window [<window-id>] [command]
Description
Manage iTerm2 windows with support for both flat and hierarchical command styles.
Flat Command Examples:
it2 window list # List all windows
it2 window create # Create new window
it2 window close 1 # Close window 1
Hierarchical Command Examples:
it2 window 1 tab list # List tabs in window 1
it2 window 1 session list # List sessions in window 1
it2 window 1 tab 2 session list # List sessions in tab 2 of window 1
The hierarchical style provides context-aware navigation while maintaining
full compatibility with existing flat commands.
Command Reference
Window Management Commands:
- it2 window close - Close a window
- it2 window create - Create a new window
- it2 window current - Show the current window ID
- it2 window focus - Focus/activate a window
- it2 window list - List all iTerm2 windows
Display & Appearance Commands:
- it2 window clear-title - Clear the title of a window
- it2 window get-title - Get the title of a window
- it2 window set-title - Set the title of a window
Property Commands:
- it2 window get-property - Get a window property
- it2 window set-property - Set a window property
Layout Commands:
- it2 window tree - Show split tree structure for a window
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 - iTerm2 CLI
- it2 app - Control the iTerm2 application
- it2 arrangement - Manage iTerm2 window arrangements
- it2 auth - Manage iTerm2 API authentication
- it2 badge - Manage session badges
- it2 broadcast - Manage broadcast domains
- it2 color - Manage iTerm2 colors and appearance
- it2 job - Monitor jobs in iTerm2 sessions
- it2 notification - Subscribe to iTerm2 notifications
- it2 profile - Manage iTerm2 profiles
- it2 prompt - Manage prompts and command history in iTerm2 sessions
- it2 selection - Text selection operations in iTerm2
- it2 session - Manage iTerm2 sessions
- it2 statusbar - Manage iTerm2 status bar components
- it2 tab - Manage iTerm2 tabs
- it2 text - Text and buffer operations in iTerm2
- it2 tmux - Manage tmux integration
- it2 variable - Manage iTerm2 variables