it2 session profile set
Set a session profile property
Synopsis
it2 session profile set [<session-id>] <property> <value>
Description
Set a profile property for a session.
This sets a per-session override without modifying the underlying profile.
If no session-id is provided, uses $ITERM_SESSION_ID environment variable.
The value will be automatically formatted as JSON based on the property type.
For colors, numbers, and booleans, the value is auto-detected. For other types,
the value is treated as a string.
Common profile properties:
- Badge Text: Session badge text (string)
- Title: Session title (string)
- Name: Session name (string)
- Background Color: Background color (color dict)
- Foreground Color: Text color (color dict)
Examples
# Set badge text for current session
$ it2 session profile set "Badge Text" "PROD"
# Set title for current session
$ it2 session profile set Title "My Session"
# Set property for specific session
$ it2 session profile set abc123 Name "Build Server"
# Set badge with environment indicator
$ it2 session profile set "Badge Text" "🔴 PROD"
# Clear badge text
$ it2 session profile set "Badge Text" ""
# Set multiple properties
$ it2 session profile set Title "Database" && \
$ it2 session profile set "Badge Text" "DB"
# Set based on hostname
$ it2 session profile set "Badge Text" "$(hostname -s)"
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 profile - Manage session profile properties
- it2 session profile get - Get a session profile property
- it2 session profile list - List all profile properties for a session
- it2 session profile reset - Reset a session profile property to profile default