Use this file to discover all available pages before exploring further.
Command execution doesn’t use SSH or the network. There’s a dedicated channel between the host and a guest agent running inside the VM, completely separate from the sandbox’s network stack. The agent spawns processes, streams output back, and reports exit codes.One nice consequence: exec works even when a sandbox has networking fully disabled.
Run a command through the sandbox’s configured shell (defaults to /bin/sh). Useful for pipelines, redirects, and other shell syntax that exec doesn’t interpret.
let output = sb.shell("ls -la /app && echo done").await?;
For long-running processes or large output, streaming gives you stdout, stderr, and exit events as they happen instead of buffering everything until the command finishes.
Bridges your terminal directly to a process inside the sandbox for a fully interactive PTY session. Useful for debugging, running REPLs, or anything that expects a real terminal.
let exit_code = sb.attach_shell().await?;let exit_code = sb.attach_with("python", |a| a .env("DEBUG", "1") .cwd("/app") .detach_keys("ctrl-q")).await?;
Press Ctrl+] (or your configured detach keys) to detach from the session without stopping the process. The process keeps running inside the VM and you can reattach later via its session ID.
Streaming handles can also accept stdin. Enable stdin_pipe and write bytes to it. Combined with tty: true, this lets you drive interactive processes programmatically.
let mut handle = sb.exec_stream_with("python", |e| e.stdin_pipe().tty(true)).await?;let stdin = handle.take_stdin().unwrap();stdin.write(b"print('hello')\n").await?;stdin.write(b"exit()\n").await?;handle.wait().await?;
Each streaming exec creates a session ID that you can use to correlate stream events and persisted log entries. Session listing and reattach are coming soon.
let handle = sb.exec_stream("python", ["server.py"]).await?;let session_id = handle.id().to_string();