Vercel Sandbox now accepts environment variables at creation
By Steven Van ·
Environment variables set when a Sandbox is created now apply to every command, with per-command overrides still available.
Vercel Sandbox now accepts environment variables at creation, and those variables are automatically inherited by every command run inside the sandbox. Previously, multi-step processes like installing dependencies, building a project, or starting a dev server each needed the same environment variables passed separately.
Variables passed to Sandbox.create() now carry through to every runCommand call. Per-command env options in runCommand can still override individual values when needed. The change is available in the latest Sandbox CLI and SDK; run npm i @vercel/sandbox to update. Read the full announcement.