it2 broadcast send

Send text to broadcast domain

Synopsis

it2 broadcast send <text> [flags]

Description

Send text to all sessions in active broadcast domain.

By default, sends a carriage return (\r) after the text to execute commands.
Use --skip-newline to send text without any line terminator.
Use --send-lf to send line feed (\n) to move to new line without executing.

Pre-conditions:
The --require flag allows checking pre-conditions on ALL sessions before sending.
This ensures all sessions are ready before broadcasting.

Examples

# Send to all sessions in broadcast domain
$ it2 broadcast send 'echo hello'
# Send without line terminator
$ it2 broadcast send --skip-newline 'partial text'
# Wait for all sessions to be ready before sending
$ it2 broadcast send --require is-at-prompt 'ls -la'
# Multiple pre-conditions with custom timeout
$ it2 broadcast send --require is-at-prompt --require has-no-partial-input --require-timeout 30s 'pwd'

Options

--confirm

Prompt for confirmation before sending

--delay-before-terminator

Delay before sending line terminator

--require

Pre-condition plugins to check on ALL sessions before sending (e.g., 'has-no-partial-input', 'is-at-prompt')

--require-timeout (default "10s")

Timeout for pre-condition checks per session
-r, --send-cr
Send carriage return (\r) to execute command (default)

--send-lf

Send line feed (\n) to move to new line

--skip-newline

Don't send any line terminator

--stop-on-error

Stop on first error instead of continuing

--verbose

Print pre-condition status messages

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