Skip to content

Terminals ​

Shells running on the host. Any client can open one, type into it, and read its output.

Screen ​

The palette (ctrl+p) has Show terminals and New terminal. In the terminal screen:

Command
New terminalOpen a shell
Next terminal, Previous terminal, Go to terminalMove between them
Switch terminal focusBetween the terminal and the list
InterruptSend ctrl+c to the shell
Clear terminalClear the output
Rename terminalGive it a name
Close terminalClose it

Commands ​

CommandFlags
terminal listWhat is running--json
terminal newOpen a shell--cwd DIR --trust --name N
terminal send <uri> <text>Type into it
terminal watch <uri>Follow its output--timeout S
terminal rm <uri>Close it

MCP tools ​

Served with --mcp-tools terminals.

ToolWhat it doesArguments
list_terminals
terminals, read only
The terminals the host is running, with the URI each other terminal tool takes.
new_terminal
terminals
Start a terminal on the host and return its URI.
workingDirectorystring
An absolute path on the host.
namestring
send_to_terminal
terminals
Send a line to a terminal. A newline is added unless newline is false, because a shell runs lines rather than strings.
terminalstring, required
A terminal URI from list_terminals or new_terminal.
textstring, required
newlineboolean
Whether to end it with a newline. True unless said otherwise.
read_terminal
terminals, read only
What a terminal has written so far. With waitSeconds it keeps reading until the process exits or that long passes, which is how a command that was just sent is waited on.
terminalstring, required
waitSecondsnumber
Wait this long for the process to exit before answering. Zero, the default, answers with what is there now.
dispose_terminal
terminals
Close a terminal on the host.
terminalstring, required

Host support ​

Terminals are AHP's terminal channel.