6 / 9 · Applies to v0.1.3
wsctl command reference
Every command of the terminal control CLI, its permissions, and its errors.
Basics#
wsctl is the control CLI bundled with the app. Run it inside an sdedit terminal. Those terminals have it on PATH and hold their ID in APP_PANE_ID.
| Command | What it does |
|---|---|
wsctl --help / --version | Prints usage or version. |
wsctl ping | Checks the connection to the app. |
wsctl list | Lists terminal IDs, tab titles, Enter permission, and trailing state=… (up to 256 terminals). |
wsctl status [PANE] | Prints the terminal state and elapsed time (current terminal if omitted). |
wsctl wait PANE [--state S] [--timeout SEC] | Waits until the specified terminal reaches the target state. |
wsctl open FILE [LINE [COLUMN]] | Opens a file beside the calling terminal. If that terminal is in another tab group, the file opens there without switching the visible group. The file must be inside the workspace. |
wsctl notify KIND MESSAGE [PANE] | Sends a notice, completed, or error notification, up to 300 characters. |
wsctl hook AGENT EVENT | Hook notification command (claude / gemini / codex, waiting / completed / error). Exits 0 outside sdedit. |
wsctl split DIRECTION [PROGRAM [ARGS...]] | Splits a terminal left, right, up, or down, waits until registration completes, and prints the new ID. The working directory must be inside the workspace. |
wsctl send [--enter] PANE TEXT | Sends text to the terminal with that ID. |
wsctl send [--enter] --to TITLE TEXT | Sends text to the terminal that you gave that name. |
On success it prints the result (a list, an ID, or ok). On failure it prints a message starting with wsctl: and exits with a nonzero status.
Examples#
wsctl open README.md 12 3
wsctl split right # new shell on the right
wsctl split down npm test # split below and run a command
npm run build && wsctl notify completed "Build done" || wsctl notify error "Build failed"
wsctl send "$APP_PANE_ID" "echo hello"
In PowerShell, use $env:APP_PANE_ID for the terminal ID.
Send to another terminal#
send takes a single line without control characters. By default it only pastes and does not run anything.
- Right-click the receiving terminal’s body and use Rename Terminal… to name it, for example
agent. - To let others run commands there, choose Allow wsctl send --enter in the same menu. The terminal shows “Enter allowed”; press that badge to revoke it.
- Run the command in the sending terminal.
wsctl send --to agent "npm test" # paste only
wsctl send --enter --to agent "npm test" # run in an allowed terminal
--to matches only names you gave terminals, not automatic tab titles. It ignores letter case. If several terminals match, use an ID from wsctl list. The Enter permission is per terminal and is off again when the terminal is reopened.
Caution: allowing --enter lets processes in other terminals run commands there. Allow it only where you need it.
Permissions and safety#
| Commands | Terminal control setting | Caller check (macOS / Linux) |
|---|---|---|
ping, open, notify, hook | Not affected | None |
list, status, wait, split, send | Must be on | Only processes started from an sdedit terminal |
Windows uses a local named pipe restricted to the current user and does not check the calling process.
Turning off Allow inter-terminal control via wsctl (list, split, send) in Settings stops all three. split and send are logged under Terminal Control in the Output tab.
Errors#
| Message | What to do |
|---|---|
Run wsctl inside an sdedit terminal. | Run it in an sdedit terminal. |
Inter-terminal control is disabled in Settings. | Enable terminal control in Settings. |
Only processes running inside an sdedit terminal may run this command. | Run it from a process started in a terminal. Detached background processes may be refused. |
Enter submission is not allowed for the target terminal. … | Allow Enter on the receiving terminal. |
No named terminal matches "…". … | Name the receiving terminal from its context menu, or use the terminal ID. |
Multiple active terminals match title "…". … | Use the terminal ID. |
Select a file inside the workspace. | Choose a file inside the opened folder. |
The workspace has changed. | Run it again from a terminal opened after switching folders. |