Beside the session

Terminals

Real shells in your space's folder, beside the session, and a terminal for each session that you and its agent can both use.

On this page
  1. Open a terminal
  2. Scripts
  3. Closing and keeping
  4. Terminals and agents
A terminal tab in the side panel, titled vim · dashboard, showing vim with a TypeScript file open at lines 62 to 80.
vim, running in a terminal tab in the side panel.

Open a terminal

ToDo this
Open a new terminal in this space, or File ▸ New Terminal
Show this session's terminal, View ▸ Show Terminal, or the side panel's + ▸ Terminal
Run one of the space's scriptsRun on the space page's Scripts tab

A terminal is a login shell, started in the space's folder, so it has the PATH and setup your own terminal has. A tab is named for what it's running.

A session's own terminal opens as a tab of the side panel, or docked under the transcript: choose with Settings ▸ General ▸ Session terminal, Right or Bottom. Closing the dock keeps the shell running.

Scripts

A space page's Scripts tab. Scripts in this space lists Test (pnpm -r test), Typecheck (pnpm -r typecheck) and Dev server (pnpm dev --port 3100), each with a Run button, then Add script and a note on putting a script on a key.
Three scripts in a space, each a click from a terminal.

A space's Scripts tab keeps the commands you run there often. Add script names one, and Run starts it in a terminal in the space. To put a script on a key, copy its command id from the row's ⋯ menu into a rule in your keybindings.json (see Settings and shortcuts).

Closing and keeping

  • The trash on a terminal's bar ends it: it closes the shell and removes the terminal. Because a shell can be holding work, it asks you to press again first.
  • only takes the terminal out of your layout. It stays in the space, and the palette opens it again.
  • Turn on Settings ▸ General ▸ Keep terminal scrollback and a terminal comes back with its output after Realm restarts. It's off by default, because what a terminal printed can include anything a command echoed, and turning it off deletes what was kept.

Terminals and agents

Agents run their own commands with their own shell tools; those show in the transcript, not in a terminal. A terminal is for the programs that need one to talk back to: an interactive sign-in, a prompt that asks a question, a full-screen program. With Realm's terminal tools an agent can open a terminal in the space, read what's on its screen, type into it and wait for something to appear.

  • Opening, typing into or closing a terminal asks you first in Ask each time and Accept edits, goes ahead in Full access, and is refused in Plan and Ask. Reading one never asks.
  • An agent working in a terminal it didn't open, such as one of yours, asks you first.
  • When an agent's CLI is signed out, its agent can open a terminal, run the CLI's own sign-in and open the sign-in page in a browser tab. Approving the sign-in on that page is your click, unless the space lets Realm finish sign-ins.
CarefulAn agent can't type at a password prompt, in any permission mode. Type the password yourself, in the terminal.
TipTerminal colours can be Realm's or your shell's own: Settings ▸ General ▸ Terminal colours. The cursor's shape and blink are under Settings ▸ Appearance.