Setups
Reusable setup steps that prepare the sandbox and carry their own resources.
setup prepares the sandbox for an environment or product. Use setup scripts to install tools, create fixtures, start services, or expose resources the agent needs.
Each variant has its own isolated /workspace. A setup script cannot rely on files or side effects created by another variant.
Accepted shapes:
# String form: one setup script.
setup: "npm install"
# List of strings: multiple setup scripts, run in order.
setup:
- "npm install"
- "npm test -- --help"
# Object form: one named setup with optional scoped resources.
setup:
name: install-cli
script: "npm install"
# List of objects: multiple named setups, run in order.
setup:
- name: install-cli
script: "npm install"
- name: smoke-cli
script: "npm test -- --help"
# Mixed list: strings and setup objects can be combined.
setup:
- "npm install"
- name: smoke-cli
script: "npm test -- --help"Setup object
A setup object is the named form of setup. Use it when setup needs its own files, environment variables, MCP servers, or setup checks.
| Field | Required | Type / values | Notes |
|---|---|---|---|
name | Yes | Kebab-case string | Required for object form. |
script | Yes | String | Bash run before setup checks and before the agent. Secret values are not injected here. |
description | No | String | Human-readable notes. |
tags | No | String list | Free-form labels. |
files | No | File entry list | Host files staged before this setup's script runs (scoped to variants that resolve this setup). |
environment_variables | No | Environment variable list | Runtime env vars scoped to variants that use this setup. |
mcp_servers | No | MCP server list | MCP servers exposed to the agent. |
setup_checks | No | Setup check list | Checks run after setup and before the agent. |
When both a product and environment contribute setup, product setup runs before environment setup.