it2 tab create
Create a new tab
Synopsis
it2 tab create <profile> [<window-id>] [flags]
Description
Create a new tab with specified profile in a window.
Examples
# Create tab with Default profile
$ it2 tab create Default
# Create tab with SSH profile
$ it2 tab create "SSH"
# Create tab in window 1
$ it2 tab create Development 1
# Insert tab at specific position
$ it2 tab create Default --index 2
# Tab with initial command
$ it2 tab create SSH --command "ssh user@server"
# Create with badge text
$ it2 tab create Default --badge "API"
# Create multiple project tabs
$ projects=("frontend" "backend" "database" "monitoring")
$ for project in "${projects[@]}"; do
$ it2 tab create "Development" --badge "$project"
$ done
# Create tabs for different environments
$ for env in dev staging prod; do
$ it2 tab create "$env-profile" --command "cd /workspace/$env"
$ done
# Create a tab and capture its ID
$ TAB_ID=$(it2 tab create "Development" --format json | jq -r '.id')
$ it2 session create --tab "$TAB_ID" --profile "Node.js"
# List available profiles first
$ it2 profile list --format table
Options
-
--badge - Set badge text on new tab's first session
-
--command - Initial command to run in the new tab
-
--focus - Focus the new tab after creation
-
--format(default "table") - Output format (table|json|yaml|text)
-
--index(default 0) - Tab index position (0-based, appends to end if not specified)
-
--timeout(default "5s") - Command timeout
-
--url(default "ws://localhost:1912") - iTerm2 WebSocket URL
See Also
- it2 tab - Manage iTerm2 tabs
- it2 tab activate - Activate a tab
- it2 tab clear-color - Clear the color of a tab
- it2 tab clear-title - Clear the title of a tab
- it2 tab close - Close one or more tabs
- it2 tab current - Show the current tab ID
- it2 tab get-color - Get the current color of a tab
- it2 tab get-info - Get detailed information about a tab
- it2 tab get-title - Get the title of a tab
- it2 tab list - List tabs in windows
- it2 tab reorder - Reorder tabs within a window
- it2 tab set-color - Set the color of a tab
- it2 tab set-layout - Set the layout of a tab
- it2 tab set-title - Set the title of a tab
- it2 tab splits - Show split pane layout and coordinates
- it2 tab tree - Show split tree structure for a tab