Reproducible templates for devboxes
Often you will want to start your devboxes with your own customizations. For example, you may want to always boot with a specific version of a language or framework or set up a specific repository.
Rather than running these commands every time you launch a devbox, you can use a blueprint to optimize boot time by saving the state of your devbox after these commands have been run. By building a blueprint, you get:
When should I use a Blueprint vs. a Snapshot?
Snapshots and Blueprints both allow you to run devboxes with customizations. Blueprints are fast to boot and cacheable using Docker layers, while Snapshots are a bit slower on boot (reproducing each step taken in the devbox) but can be created quickly from an existing devbox.
Examples:
One use case for a blueprint is preinstalling tools your AI agent may want to use. For example, let’s create a simple Blueprint that installs jq
, a lightweight command-line JSON processor:
Use the Debian package manager (apt) for installing system packages on the Runloop base image.
Once your Blueprint’s status is build_complete
, create a Devbox using it:
To add a CodeMount to your Blueprint:
This creates a Blueprint named “fe-bot” that includes the “runloop-fe” repository.
For private repositories, include a GitHub Personal Access Token (PAT):
This sets up the necessary environment for immediate use of Git and GitHub tools.
When you create a Blueprint, Runloop builds a custom image containing all specified tools and configurations.
After creating a Blueprint, check its status:
Replace {blueprint_id}
with the ID returned when you created the Blueprint.
Example response:
The status
field indicates the current state of your Blueprint:
build_complete
: Blueprint is ready to usebuild_failed
: Refer to the Blueprint troubleshooting guideFor more complex environments, you can use a full Dockerfile as the basis for your Blueprint. This is useful when you need to install multiple tools or perform complex setup operations.
Base your Dockerfile on the Runloop base image:
Runloop will:
system_setup_commands
specifiedCodeMount
sThe Runloop base image is public and can be downloaded for local testing.
Periodically update Blueprints by building a new blueprint with the same name. This ensures that your AI agents always work with the latest code and dependencies.
This creates a new Blueprint version with the same name
, allowing for faster updates and efficient resource use.
blueprint_name
instead of blueprint_id
to ensure you’re using the latest version. Use specific Blueprint IDs only when you need version control for particular setups.setup_commands
in your Devbox creation to keep code and dependencies up-to-date.By leveraging Blueprints effectively, you can create optimized, consistent environments for your AI-assisted software engineering tasks, enhancing productivity and reliability in your development process.
Future releases plan to include:
If any of these features are critical for your use case, please let us know.