This is the full field reference for blueprints. For an introduction to blueprints and how they fit into Devin’s environment, see Declarative environment configuration.
Overview
A blueprint has three core top-level sections, plus optionalruns-on, shell, and includes fields, a post-build section for organization- and enterprise-level blueprints, and a clone section for repository-level blueprints:
All sections are optional. You can include any combination.
initialize runs during full builds and for workspaces rebuilt from scratch. Results are saved in the snapshot. In a differential build, inherited workspaces skip initialize, pull the latest code, and run only maintenance. Write maintenance so it is self-contained and can run independently on top of the existing snapshot without requiring initialize to run immediately beforehand or relying on environment variables that initialize previously wrote to $ENVRC. At the start of every session, maintenance commands are not auto-executed — instead, they are surfaced to the agent as context so it knows which dependency commands to run if needed (e.g. after pulling latest code). Commands should still be fast and incremental. Builds run automatically when your blueprint changes and periodically (every ~24 hours).
initialize
Useinitialize for installing tools and runtimes that don’t depend on the specific state of your code: language runtimes, system packages, global CLIs.
Simple form
For straightforward shell commands, use a block scalar:Structured form
For named steps, environment variables, or GitHub Actions, use a list:run.
When to use initialize vs maintenance
Both sections run during full builds. In differential builds, inherited workspaces skip
initialize and run only maintenance after pulling the latest code. Tools and runtimes go in initialize; dependency commands that track your code’s lock files go in maintenance.
maintenance
Usemaintenance for dependency installation and other commands that should run after your code is cloned. These commands run during builds and are surfaced to the agent at session start so it can re-run them if dependencies have changed. This is where npm install, pip install, uv sync, and similar commands belong.
For repo-level blueprints,
maintenance commands run from the repository root directory. For org-level blueprints, they run from the home directory (~).knowledge
Theknowledge section is not executed. It provides reference information that Devin uses when working in your project. This is how you tell Devin the correct commands for linting, testing, building, and any other project-specific workflows.
The
name field is a label. By convention, lint, test, and build are the standard names. Devin references these when verifying its work. You can add any additional knowledge items with custom names:
runs-on
The optional top-levelruns-on field accepts a string or a list of strings. Its default is ["default"]. The default and linux labels are case-insensitive aliases for the default Linux platform. Any other label must match a machine configuration registered on your account, such as windows or macos.
When a block lists multiple platform labels, Devin creates one snapshot build per platform and runs the same steps for each platform. Two blocks in the same file cannot resolve to the same platform; this includes the default and linux aliases.
For platform-specific setup, see Windows support and macOS support.
shell
The optional top-levelshell field selects the shell that runs the block’s run steps on Windows machines. It applies to every run step in the block’s initialize, maintenance, and post-build sections.
Values are case-insensitive. Any other value is rejected with
shell: must be 'default', 'bash', or 'powershell'.
shell: powershell:
- Secrets, step-level
envvariables, variables that earlier steps wrote to$ENVRC, and the working directory are the same as for bash steps. Read environment variables with PowerShell syntax ($env:NAME). - The cross-step
$ENVRCexamples are written for bash steps. In a PowerShell step,$env:ENVRCholds the Git Bash-style path of the file (/c/...), so those examples don’t apply as written; keep steps that need to persist variables to later steps in a block that uses the default shell. - Use native Windows paths (
C:\Users\...) rather than the Git Bash/c/...form. - A PowerShell error (for example, a failing cmdlet or an unknown command) stops the step.
- For native executables, only the exit code of the last one the script runs determines the step result. Check
$LASTEXITCODEafter earlier native commands whose failure should stop the step. usessteps (GitHub Actions) are not affected.
shell is set per block, a multi-document blueprint can use shell: powershell in its Windows document without affecting the Linux document. In a block that lists multiple platforms in runs-on, the same run bodies execute in PowerShell on Windows and in bash everywhere else, so they must be valid in both shells.
includes
The optionalincludes field only applies to git-backed blueprints: Devin resolves it when it discovers a repository’s root .devin/blueprint.yaml file. It is ignored in blueprints authored in the Settings editor, and it is not allowed in an included workspace blueprint.
It accepts a string or a list of strings. Each entry identifies a workspace subdirectory; Devin looks for <dir>/.devin/blueprint.yaml, and the full file path also works. Paths cannot contain ...
Nested includes are rejected, and each workspace path can appear only once. If an included file is missing, Devin treats that workspace as removed.
post-build
Thepost-build section is available on organization-level and enterprise-level blueprints only (it is not supported in repository-level blueprints). Its steps run during the build after all repositories have been cloned and their initialize and maintenance steps have completed, but before the health check and the snapshot image is created. This makes it the right place for cross-repository validation and health checks that need the fully assembled environment.
Because it runs late in the build with the whole environment in place, a post-build step can see every cloned repository and every tool installed by the enterprise, organization, and repository blueprints.
post-build steps use the same step types as initialize (shell run commands and GitHub Actions uses), and run from the home directory (~).clone
For repository-level blueprints, the optionalclone section overrides defaults used when Devin clones the repository into the snapshot. Every field is optional and falls back to a sensible default that preserves current behavior.
clone only applies to repository-level blueprints — it controls how that specific repository is cloned into the snapshot. It has no effect in organization-level or enterprise-level blueprints.Step types
Each step ininitialize, maintenance, or post-build uses one of two types: shell commands (run) or GitHub Actions (uses). maintenance steps support run only; see GitHub Actions.
Shorthand and validation rules
- A section provided as a bare string becomes a single
runstep. - A list entry provided as a bare string becomes a
runstep. - A step must define
runoruses, but never both. usessteps can’t be used inmaintenance. The build fails with'uses' steps are not supported in maintenance sections.withis valid only onusessteps.- All
withvalues are converted to strings; quote numeric values when the action expects a string.
YAML document rules
Each--- document must be a YAML mapping. A top-level sequence is rejected with each YAML document must be a mapping, not a sequence; use '---' to separate multiple blocks.
Shell commands (run)
Execute arbitrary shell commands in bash, or in Windows PowerShell on Windows when the block sets shell: powershell:
Execution details:
- Commands run in bash (Git Bash on Windows). If any command in a multi-line script fails, the entire step stops immediately. On Windows, set the top-level
shellfield topowershellto run commands in Windows PowerShell instead. - Org-level blueprints execute in the home directory (
~). - Repo-level blueprints execute in the cloned repository root.
- Each step has a timeout of 3 hours.
- Secrets are automatically available as environment variables.
GitHub Actions (uses)
Run GitHub Actions directly in your blueprint’s initialize (or post-build) section:
Action reference format:
github.com/ prefix and @<ref> suffix are both required. The ref is typically a version tag like v5.
Commonly used actions:
Node.js actions (
node16, node20, node24) and composite actions are supported. Docker actions are supported on Linux builds only, not on Windows builds. post cleanup steps are skipped. See GitHub Actions limitations.with values work:
Values passed via with are provided to the action as inputs, following the same conventions as GitHub Actions workflows. All values are converted to strings.
setup-python adds the Python binary to PATH, which remains available for all later steps and in maintenance.
run vs uses: which to use
In practice, most configurations use
uses for language runtimes and run for everything else.
Environment variables and secrets
Step-level environment variables
Any step can define extra environment variables with theenv field:
Cross-step environment variables ($ENVRC)
To propagate environment variables across steps, write them to the $ENVRC file:
$ENVRC are automatically exported and available to all
subsequent steps and the Devin session produced by the current build. This works
similarly to $GITHUB_ENV in GitHub Actions.
This also applies to PATH. If you install a tool to a non-standard directory
(anything outside /usr/bin or /usr/local/bin), append it to $ENVRC so
subsequent steps and repo-level blueprints can find the binary:
export PATH=... inside a run: block only affects that step’s shell.
Each step starts a new shell process, so PATH changes that are not written to
$ENVRC are lost.
uses: actions (e.g. actions/setup-node) automatically propagate their PATH
additions to $ENVRC — you only need to do this manually for run: steps.$ENVRC is reset at the start of every build, including differential builds.
Values written during one build are not available to the next build. In
particular, an inherited workspace runs only maintenance, so it cannot rely on
PATH or other variables that initialize wrote to $ENVRC in the parent
build. Configure any environment required by maintenance within
maintenance itself.
Secrets
Secrets configured in the Devin UI (via the Secrets tab in each blueprint editor) are automatically injected as environment variables. You don’t declare them in your blueprint. Just reference them by name (e.g.,$MY_SECRET).
Secrets are injected before every step runs during builds. They are scrubbed from the snapshot image itself, so credentials are never baked into saved machine images. Outside of blueprint commands, secrets are not exported to every shell; Devin binds them to the specific commands that need them.
- Organization secrets: Available as environment variables in every step across all blueprints in the org. Set these in the Secrets tab of the org-wide blueprint editor.
- Enterprise secrets: Merged with org secrets (org secrets take precedence on name collisions). Available across all orgs in the enterprise.
- Repository secrets: Available as environment variables in that repo’s blueprint steps and commands. Configure these in the Secrets tab of the repository’s blueprint editor.
Build-only secrets: Enterprise secrets can be marked Build only when you add them in the enterprise blueprint editor’s Secrets tab. This option is not available for org or repository secrets. A build-only secret is available only to enterprise and org blueprint steps during snapshot builds. It is removed before repositories are cloned, so repo blueprint steps and
post-build steps cannot read it, and it is never injected into Devin sessions. Use it for credentials needed only during enterprise or org setup (e.g., downloading private artifacts in the enterprise blueprint’s initialize).File attachments
You can upload files (likesettings.xml or other configuration files) through the blueprint editor. Uploaded files are written to ~/.files/ and an environment variable is set pointing to each file’s path:
FILE_.
File names must be plain file names: they cannot start with a dot or contain path separators, whitespace, or control characters. To use a dotfile such as .npmrc, upload it under a name without the leading dot (for example, npmrc) and copy it into place in a blueprint step.
Use file attachments in your blueprint steps:
Git-backed blueprints
You can store blueprints as.devin/blueprint.yaml files directly in your repository, then sync them via the API or the UI. See Git-backed blueprints for setup instructions and details.
Complete example
For how blueprints compose across tiers (enterprise → org → repo), build statuses, repository states, and what triggers a rebuild, see Builds and sessions on the Declarative configuration page.

