ReadonlynetNetwork operations on the devbox.
ReadonlycmdCommand execution operations on the devbox.
ReadonlyfileFile operations on the devbox.
Get the complete devbox data from the API.
Optionaloptions: RequestOptions<unknown>Request options
The devbox data
Get the tunnel information for this devbox. Returns null if no tunnel has been enabled.
Optionaloptions: RequestOptions<unknown>Request options
The tunnel information, or null if no tunnel exists
Get the tunnel URL for a specific port. Throws an error if no tunnel has been enabled.
The port number to construct the URL for
Optionaloptions: RequestOptions<unknown>Request options
The tunnel URL for the specified port
Get all logs from a running or completed devbox. Optionally filter by execution ID.
Optionalparams: LogListParamsOptional filter parameters (execution_id)
Optionaloptions: RequestOptions<unknown>Request options
The devbox logs
Wait for the devbox to reach the running state. Uses optimized server-side polling for better performance.
Optionaloptions: LongPollRequestOptions<DevboxView>Request options with optional long-poll configuration
The devbox data when running state is reached
Wait for the devbox to reach the suspended state. Uses optimized server-side polling for better performance.
Optionaloptions: LongPollRequestOptions<DevboxView>Request options with optional long-poll configuration
The devbox data when suspended state is reached
Create a disk snapshot of the devbox. Returns a snapshot that is completed. If you don't want to block on completion, use snapshotDiskAsync().
Optionalparams: DevboxSnapshotDiskParamsSnapshot creation parameters
Optionaloptions: RequestOptions<unknown> & {Request options with optional polling configuration
A completed Snapshot instance
Create a disk snapshot of the devbox asynchronously. Returns a snapshot that is not yet completed but has started. You can await completion using snapshot.awaitCompleted().
Optionalparams: DevboxSnapshotDiskParamsSnapshot creation parameters
Optionaloptions: RequestOptions<unknown>Request options
A Snapshot instance that has started but may not be completed
Shutdown the devbox.
Optionaloptions: RequestOptions<unknown>Request options
Shutdown result
Suspend the devbox and create a disk snapshot.
Optionaloptions: RequestOptions<unknown>Request options
Suspend result
Resume a suspended devbox and wait for it to reach the running state.
Optionaloptions: LongPollRequestOptions<DevboxView>Request options with optional long-poll configuration
The devbox data when running state is reached
Resume a suspended devbox without waiting for it to reach the running state.
Optionaloptions: RequestOptions<unknown>Request options
Resume result
Register a callback fired once if this devbox gets a pending infrastructure eviction.
The first onEvict across any devbox on this client opens a single account-wide
notification stream; it closes automatically once every registered devbox has been
notified. The callback runs at most once and is invoked as
callback(devbox, evictionDeadlineMs) — this devbox and the Unix millisecond
deadline by which it will be suspended. Use it to run cleanup before suspend.
Invoked with this devbox and its eviction deadline (ms).
Withdraw this devbox's eviction interest registered via onEvict.
Object-oriented interface for working with Devboxes.
Remarks
Overview
The
Devboxclass provides a high-level, object-oriented API for managing devboxes. Devboxes are containers that run your code in a consistent environment. They have the the following categories of operations:Quickstart