Skip to main content
A blueprint defines the core configuration for a Devbox environment. It captures the operating system, base image, machine size, access mode, and optional settings like repositories, environment variables, and network policy, so you can create consistent Devboxes from a single reusable definition. Your workspace’s blueprints live on the Blueprints page in the dashboard.

Create from Blueprint

Create a Devbox that inherits everything the blueprint defines.
--blueprint uses the latest version of the named blueprint, and cannot be combined with --from or --platform.

Managing Blueprints

The Devbox CLI cannot create or manage blueprints. Use the dashboard or the TypeScript SDK, then create Devboxes from them with devbox create --blueprint.

Create a Blueprint

blueprints.create() takes a name and a complete definition:
image is required, and every other field is optional.A fuller definition can set environment variables, who may use the blueprint, whether its Devboxes are ephemeral, and which domains they may reach:
See Use blueprints for every field.

List Blueprints

blueprints.list() returns one page at a time:
Pass the returned nextCursor as the next call’s cursor, or use blueprints.iterate() to walk every page automatically.Fetch a single blueprint by name to read its full definition:

Update a Blueprint

blueprints.update() replaces the entire definition, so spread the current one and override only what changes. Anything you omit is cleared:
Each update produces a new blueprint version. Devboxes created afterwards use the latest version, and existing Devboxes are unaffected.

Delete a Blueprint

Deleting a blueprint does not affect Devboxes already created from it.

Additional configuration

When creating or updating blueprints, you can configure additional settings.

Ephemeral

Devboxes can be created as ephemeral, tying their instance and storage to a single run. When an ephemeral Devbox stops, both its instance and storage are automatically deleted. On restart, it starts fresh. Ephemeral Devboxes suit short-lived tasks or experimentation where you don’t need to retain data across restarts.
Pass an object instead of true to control how long the stopped Devbox is retained.

Repository

Devboxes can be configured to automatically clone a GitHub repository when they are created.
To list your GitHub repositories, you need to enable the GitHub integration. From the new/edit blueprint page, expand the Repository dropdown, and select Connect an organization, and follow the instructions.
A blueprint definition in the TypeScript SDK has no repository field. Set repository when you create the Devbox instead.

Idle timeout

Devboxes will go to sleep after a period of inactivity, which is configured with Auto-stop timeout on idle.
busyTimeoutMs is the idle timeout, expressed in milliseconds:
A sleeping Devbox does not consume compute, so you are not paying for time the Devbox spends idle. When it wakes, its filesystem is intact, so work continues from where it left off. The exception is an ephemeral Devbox, which deletes its storage when it stops. If a Devbox needs to survive an idle period, avoid pairing a short idle timeout with the ephemeral setting.

Tailscale

Devboxes support Tailscale out of the box. With Tailscale, a Devbox can reach private resources on your network that are not exposed to the internet, such as internal package registries, databases, staging services, or a self-hosted Git server. This lets you build and test against your internal dependencies without opening those services publicly. Combined with egress filtering, you can keep the Devbox’s outbound access limited to your tailnet and a short list of allowed domains, so it only reaches what a task actually needs. See the Tailscale Integrations for instructions on how to configure it in your workspace.

Environment variables

You can populate your Devbox’s environment variables by providing:
  • Environment Variables - values are provided in plain text
  • Secrets - loads secret values from the Namespace vault
environment takes plain values only. To reference a vault secret, define the blueprint in the dashboard, or use env with from_secret_id in a spec file.
See Managing Secrets on how to list, add, update, and remove your secrets.

Egress filtering

Egress filtering restricts the outbound network access of a workload to a list of allowed domains. This is useful when a Devbox should only reach the source hosts, package registries, model APIs, or other services that a task actually needs. Everything else is guaranteed to be blocked.
Set advisory: true to report violations without enforcing them.

Initialization

A blueprint can run commands as its Devboxes come up: once when a Devbox is first created, and again in a terminal session every time one starts. Both are configured on the new or edit blueprint page.

Init script

The init script runs once, when a Devbox created from the blueprint is first initialized. Use it for setup that only needs to happen on a fresh Devbox, such as installing dependencies.
Expand Update script, then enter the commands to run:

Sessions

A session starts a tmux session every time a Devbox created from the blueprint starts, and runs the command you give it. Use one for a process you want to come back to, such as a dev server.
Press + Add session, give the session a name and a command, then press Add:
Add as many sessions as you need. Each one is independent, with its own name and command, so a blueprint can bring up a dev server, a test watcher, and a spare shell side by side.
See Sessions for how to attach to a session once the Devbox is running. A blueprint definition in the TypeScript SDK has no init script or sessions field.
Last modified on September 16, 2026