Terminals
A terminal is a opened inside the machine, with stdin/stdout streamed to your client over a WebSocket. The machine wakes if it was sleeping.
Use the CLI commands below. See the SDK reference for released client methods.
dedalus machines terminals create \
--machine-id <machine_id> \
--width 80 \
--height 24 \
--shell /bin/bash \
--cwd /root \
--env '{"FOO":"bar"}'
Parameters
machine_id · string · required
The machine where the terminal opens.
width · integer · required
Initial terminal width in columns.
height · integer · required
Initial terminal height in rows.
shell · string · default: /bin/bash
Shell to start inside the PTY.
cwd · string · default: /root
Working directory for the shell.
env · object
Extra environment variables for the shell.
Wire protocol
| Direction | Frame | Payload |
|---|---|---|
| Client → server | Binary | Raw bytes written to the shell's stdin (keystrokes, paste, etc.) |
| Client → server | Text (JSON) | {"cols": 100, "rows": 30} to resize the PTY |
| Server → client | Binary | Raw bytes from the shell's stdout/stderr (ANSI escapes intact) |
| Server → client | Close | Shell exited or session expired |
Manage terminals
dedalus machines terminals list --machine-id <machine_id>
dedalus machines terminals retrieve --machine-id <machine_id> --terminal-id <terminal_id>
dedalus machines terminals delete --machine-id <machine_id> --terminal-id <terminal_id>
Parameters
machine_id · string · required
The machine that owns the terminal.
terminal_id · string · required
The terminal to retrieve or close.
