Band Band

band terminals

The band terminals command group manages PTY-backed terminal sessions inside a workspace. Each terminal has its own shell process and scrollback buffer. Terminals are useful for running long-lived processes (dev servers, watchers, REPLs) and reading their output from scripts.

For agent-driven work, prefer band chats — it gives you streaming events, abort, and conversation history out of the box.

Default workspace and terminal resolution

Every band terminals subcommand auto-detects the workspace from the current working directory when [workspace_id] is omitted, and resolves to the workspace's first terminal session when [terminal_id] is omitted.

List terminals

band terminals list
band terminals list ws_abc123

Create a terminal

band terminals create                                # cwd workspace, default shell
band terminals create --command "npm run dev"        # auto-runs a command on spawn
band terminals create --cwd packages/web             # subdirectory of the workspace

Options:

  • workspace_id (positional, optional) — auto-detected from cwd if omitted.
  • --command <cmd> — a shell command to run after spawn.
  • --cwd <dir> — working directory relative to the workspace root.

Send input

Send characters to a terminal's stdin. Use \n for a newline (i.e. press Enter) and \t for tab.

band terminals send --data "echo hello\n"
band terminals send t_abc --data "ls -la\n"

Read output

# Last 50 lines from the cwd workspace's first terminal
band terminals output --lines 20

# Stream live output (Ctrl+C exits the stream, terminal keeps running)
band terminals output --follow

# Target a specific terminal
band terminals output t_abc --lines 100

Attach interactively

Stream the terminal's output to your local TTY and forward your keystrokes back to its stdin. Press Ctrl+C to detach (the terminal stays alive on the server).

band terminals attach
band terminals attach t_abc

Kill a terminal

band terminals kill                  # cwd workspace's first terminal
band terminals kill t_abc

JSON output

band terminals list --output json
band terminals create --command "npm run dev" --output json | jq -r .terminalId