Skip to content

Execution & shells

Commands that drive execution inside a running sandbox: one-shot commands, interactive shells, and visibility into what’s currently running and listening.

CommandDescription
bhatti execRun a command. Streaming or buffered output, optional timeout, optional detach.
bhatti shellOpen an interactive shell with detach/reattach semantics (alias: sh).
bhatti psList active sessions in a sandbox (init scripts, shells, detached execs).
bhatti portsList listening ports detected inside a sandbox.

All commands wake cold sandboxes transparently — you don’t need to start the sandbox first.

Terminal window
bhatti exec dev -- npm install # one-shot command
bhatti exec dev -- bash -c 'echo $API_KEY' # shell expansion via /bin/bash
bhatti exec dev --timeout 60 -- long-running.sh # cap runtime at 60s
bhatti exec dev --detach -- ./worker.sh # run in background, return PID
bhatti shell dev # interactive (Ctrl+\ to detach)
bhatti shell dev --new # don't reattach to a running session
bhatti ps dev # what's running inside?
bhatti ports dev # what's listening?