porter-sandbox:
Porter
Porter is the top-level client. It exposes resource namespaces for sandboxes, volumes, health, and readiness.
Close the client when your process is done:
porter.sandboxes
create
Returns a
Sandbox handle.
get
Sandbox handle. Use names as the canonical reference for sandboxes you need to operate on later.
list
Sandbox
Sandbox is the handle returned by porter.sandboxes.
Properties:
Methods:
exec timeouts
exec is long-running: the client sends no timeout by default, so the call waits for the command to exit. Pass requestOptions.timeoutMs to cap how long the client waits. When the timeout elapses, the SDK throws SandboxTimeoutError and does not retry, since the command may still be running server-side.
timeoutMs on Porter still applies to every other request (30 seconds by default).
Volumes
Volumes are persistent storage that can be mounted into sandboxes.create, get, and list return Volume | ObjectVolume; the type getter discriminates the union. A Volume (disk) has id, name, type, phase, path, attachedTo, and createdAt, plus:
An
ObjectVolume shares id, name, type, phase, attachedTo, createdAt, refresh(), and delete(), and adds object (the bucket, key prefix, and access mode). It has no file methods: an object volume’s contents live in its bucket.
Low-level client
The top-level client exposes generated low-level clients through.raw:

