List running processes
ProcessInfo includes pid, command, and running. The list endpoint is
useful for reconnecting to background work after a client restart.
Send stdin
send_stdin writes text to the process stdin stream. Use it for interactive
programs that are not full terminal sessions; use PTY sessions
when terminal behavior, resize, or shell line editing matters.
Logs
stdout and stderr are split streams. output is the interleaved stream when
the backend has it. exit_code is None while the process is still running and
an integer after it exits.
Kill
REST and CLI map
| Task | Python SDK | CLI | API |
|---|---|---|---|
| List processes | sandbox.commands.list() | nullspace sandbox process list sb_123 | GET /v1/sandboxes/{id}/processes |
| Fetch logs | sandbox.commands.get_logs(pid) | nullspace sandbox process logs sb_123 1234 | GET /v1/sandboxes/{id}/processes/{pid}/logs |
| Send stdin | sandbox.commands.send_stdin(pid, data) | printf ... | nullspace sandbox process stdin sb_123 1234 | POST /v1/sandboxes/{id}/processes/{pid}/stdin |
| Kill | sandbox.commands.kill(pid) | nullspace sandbox process kill sb_123 1234 | POST /v1/sandboxes/{id}/processes/{pid}/kill |
| Attach stream | sandbox.commands.connect(pid) | nullspace sandbox process attach sb_123 1234 | exec WebSocket |
--json for automation. stdin --json
returns the PID and bytes_sent; attach --json returns a CommandResult.