Before a sandbox starts doing real work, you can prepare it in two ways: scripts that bundle reusable commands, and patches that modify the rootfs before the VM boots. Both are defined at creation time and keep the base image untouched.Documentation Index
Fetch the complete documentation index at: https://superradcompanyinc-mintlify-changelog-1777648095.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Scripts
Scripts are files mounted at/.msb/scripts/ inside the sandbox. The directory is on PATH, so each script is callable by name through exec() or shell().
It provides a clean way to bundle setup procedures or entry points with a sandbox without baking them into the image.
Patches
Patches modify the rootfs before the VM boots. Write config files, copy directories from the host, create symlinks, append to existing files, remove things you don’t need. The base image stays untouched since patches are written to the writable layer on top. Patches are applied in order and work with OCI images and bind-mounted rootfs. They’re not supported with disk image roots (QCOW2, Raw).Available operations
The patch builder is invoked throughSandboxBuilder.patch(p => ...). Each method appends an operation; calls are chainable.
| Method | Description |
|---|---|
text(path, content, opts?) | Write text content to a file |
file(path, bytes, opts?) | Write raw bytes to a file |
mkdir(path, opts?) | Create a directory (idempotent) |
append(path, content) | Append content to an existing file |
copyFile(src, dst, opts?) | Copy a file from the host into the rootfs |
copyDir(src, dst, opts?) | Recursively copy a directory from the host |
symlink(target, link, opts?) | Create a symlink |
remove(path) | Delete a file or directory (idempotent) |
opts accepts { mode?: number; replace?: boolean } for text / file / copyFile, { replace?: boolean } for copyDir / symlink, and { mode?: number } for mkdir.