Skip to main content
The CLI’s connect command attaches an interactive terminal — a Remote Shell — to an already-running sandbox. It opens a real shell inside the sandbox over a PTY, streaming your keystrokes in and the shell’s output back, so you can run commands, inspect state, and debug as if you were sitting at the sandbox’s terminal.
Note: The sandbox must already be running. connect attaches to an existing sandbox by its ID; it does not create one. Disconnecting leaves the sandbox and any other users’ sessions untouched.

Prerequisites

Set your API key in the environment before connecting:
CLI

Usage

CLI
On connect, the CLI prints the sandbox’s dashboard inspect URL and a confirmation line, then hands your terminal over to the sandbox shell:
Output

Ending the session

Exit the shell as you normally would — type exit or press Ctrl+C. The CLI cleans up the terminal, closes the connection, and prints:
Output
Note: Disconnecting only ends your terminal session. It does not stop or kill the sandbox, and it does not disconnect other users connected to the same sandbox.
Last modified on August 5, 2026