Skip to main content
Create Devboxes from an image, a macOS base image, or a blueprint. This page also covers listing Devboxes and controlling their lifecycle through resource and handle methods.
Connection-backed operations, including commands, file access, terminals, and display access, automatically start a stopped Devbox. Explicitly call start() when you need to wait for readiness before another operation.

devboxes.create()

Create a Devbox and return an operational handle. Devboxes start by default. Set start: false to create one without activating it.

Example

Create a Linux Devbox from an image:

API reference

Arguments and options

CreateDevboxInput
required
The Devbox name and configuration.
OperationOptions
Cancellation and timeout options. See Shared operation options.

Return value

Returns a Devbox handle. Its id, name, and info properties describe the created Devbox. A started Devbox reports info.state as "running"; one created with start: false reports "stopped".

More examples

Create a macOS Devbox

Create a stopped Devbox from a blueprint


devboxes.get()

Fetch a Devbox by ID or name. Unlike list(), this call resolves the current runtime state.

Example

API reference

Arguments and options

string
required
The Devbox ID or name.
OperationOptions
Cancellation and timeout options. See Shared operation options.

Return value

Returns a new Devbox handle whose info.state is "running" or "stopped".

devboxes.list()

Return one page of Devboxes. Listing avoids per-Devbox runtime lookups, so each returned handle has info.state set to "unknown" and no instanceId.

Example

API reference

Arguments and options

ListDevboxesOptions
Pagination, filtering, cancellation, and timeout options.

Return value

Returns items: Devbox[] and an optional opaque nextCursor. Pass nextCursor as the next call’s cursor, or use iterate() to traverse every page automatically. Call refresh() on a listed handle before relying on its runtime state.

devboxes.iterate()

Iterate over all Devboxes, fetching subsequent pages automatically. Handles have the same "unknown" state semantics as list().

Example

API reference

Arguments and options

Omit<ListDevboxesOptions, "cursor">
The limit, orderBy, ephemeral, signal, and timeoutMs options from list(). Pagination cursors are managed internally.

Return value

Returns an async iterator that yields each Devbox from every page.

devboxes.start()

Start a Devbox and wait for readiness. Start it by ID or name, or use devbox.start() when you already have a Devbox object.

Example

API reference

Arguments and options

string
required
The Devbox ID or name.
OperationOptions
Cancellation and timeout options. See Shared operation options.

Return value

Returns a ready Devbox object with refreshed information and info.state set to "running".

devboxes.stop()

Stop a Devbox and invalidate its cached connection. Stop it by ID or name, or use devbox.stop() when you already have a Devbox object.

Example

API reference

Arguments and options

string
required
The Devbox ID or name.
OperationOptions
Cancellation and timeout options. See Shared operation options.

Return value

Returns a Devbox object with refreshed information and info.state set to "stopped".
Running a command or using another connection-backed API on this object starts the Devbox again automatically.

devboxes.delete()

Delete a Devbox and invalidate its cached connection. Delete it by ID or name, or use devbox.delete() when you already have a Devbox object.

Example

API reference

Arguments and options

string
required
The Devbox ID or name.
OperationOptions
Cancellation and timeout options. See Shared operation options.

Return value

Returns no value. The promise resolves after the Devbox has been deleted.

devbox.refresh()

Re-fetch this Devbox, resolve its authoritative runtime state, and replace the handle’s info snapshot.

Example

API reference

Arguments and options

OperationOptions
Cancellation and timeout options. See Shared operation options.

Return value

Returns the same handle with current information and info.state set to "running" or "stopped".

devbox.update()

Update mutable Devbox settings and replace the handle’s info snapshot. This method preserves the state and instance ID currently recorded by the handle.

Example

API reference

Arguments and options

UpdateDevboxInput
required
The settings to update.
OperationOptions
Cancellation and timeout options. See Shared operation options.

Return value

Returns the same handle with updated info. Call refresh() if another actor may have changed the Devbox’s runtime state.

Devbox information

Every handle exposes immutable id and name accessors and a read-only info snapshot. Lifecycle methods replace this snapshot, so read devbox.info again after awaiting one of those methods.
get(), refresh(), start(), and stop() resolve runtime state. list() and iterate() report "unknown" and omit instanceId. Connection-backed operations update the local snapshot to "running", but info is not a live subscription to server-side changes. The optional shape contains vCPUs, memoryMB, and optional architecture and os fields. Other optional fields are absent when the service does not provide them.

Shared operation options

All methods on this page accept OperationOptions.
OperationOptions
Controls cancellation and timeout behavior.

Run commands

Execute structured commands and shell scripts.

Work with files

Transfer and manipulate Devbox files.

Use blueprints

Define reusable Devbox configurations.
Last modified on August 26, 2026