client.blueprints. Create, fetch, list, update, and delete blueprints, or iterate through every blueprint in a workspace.
blueprints.create()
Create a named blueprint from a complete definition.
Example
API reference
Arguments and options
The complete configuration. See Blueprint definitions.
site to "iad" and access to "private". Blueprint sizes are resolved by the SDK and must be "s", "m", "l", or "xl". volumeSizeGB must be a non-negative safe integer.
Return value
Returns the createdBlueprint.
blueprints.get()
Fetch a blueprint by name.
Example
API reference
Arguments and options
Return value
Returns the matchingBlueprint.
blueprints.list()
List one page of blueprints.
Example
API reference
Arguments and options
Return value
Returns aPage<Blueprint>.
blueprints.iterate()
Iterate through all blueprints, fetching additional pages automatically.
Example
API reference
Arguments and options
Accepts thelimit, orderBy, signal, and timeoutMs list options. Do not pass a cursor because iteration manages pagination.
Return value
Returns an async iterator ofBlueprint objects.
blueprints.update()
Replace the complete definition of an existing blueprint.
Example
API reference
Arguments and options
The same defaults and validation ascreate() apply.
Return value
Returns the updatedBlueprint.
blueprints.delete()
Delete a blueprint by name.
Example
API reference
Arguments and options
Return value
The promise resolves after the blueprint has been deleted.Blueprint definitions
An image name or a full image reference. Strings containing
/, @, or : are treated as full references.Environment variables added to Devboxes. Each value is either a literal string or
{ secretId }, which names a Vault secret resolved when the process starts. An empty secretId throws a TypeError. Blueprints returned by the service keep secret references in the { secretId } form.Enables ephemeral behavior. The object form sets retention after stopping.
The repositories to check out in Devboxes created from the blueprint. Accepts the same
repositories list, of up to 20 entries, as versionControl on devboxes.create(). Blueprints returned by the service always use the repositories form.Named sessions, each with a
name and the command it runs, configured on Devboxes created from the blueprint. The deprecated BlueprintSession type, still used by image metadata, is Session with an optional emoji. Use Session instead. The SDK does not send emoji to the service.Ports, each with a
number and an optional name, configured for forwarding to a local machine. devbox port-forward forwards these ports when run without --ports.HTTP ports, each with a
number and an optional name, exposed on devbox.so URLs for Devboxes created from the blueprint. To manage exposed ports on an existing Devbox, use devbox.exposedPorts.