Skip to main content

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.

Vercel
Vercel
The platform for frontend developers — deploy, preview, and scale web apps and AI agents with zero config.
View Vercel →

Read the original announcement →

Read Vercel Sandbox now accepts environment variables at creation on Creators Toolbox