Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@vercel/sandbox

Package Overview
Dependencies
Maintainers
289
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vercel/sandbox

Vercel Sandbox allows you to run arbitrary code in isolated, ephemeral Linux VMs. This product is in private beta.

Source
npmnpm
Version
0.0.1
Version published
Weekly downloads
2.1M
-7.74%
Maintainers
289
Weekly downloads
 
Created
Source

Vercel Sandbox allows you to run arbitrary code in isolated, ephemeral Linux VMs. This product is in private beta.

What is a sandbox?

A sandbox is an isolated Linux system for your experimentation and use. Internally, it is a Firecracker MicroVM that is powered by the same infrastructure that powers 1M+ builds a day at Vercel.

Getting started

Vercel Sandbox is in private beta. These examples will not work unless these APIs are enabled for your team.

  • Go to your team settings, and copy the team ID.
  • Go to your Vercel account settings and create a token. Make sure it is scoped to the team ID from the previous step.
  • Create a new project:
$ mkdir sandbox-test
$ pnpm init
$ pnpm add @vercel/sandbox
$ pnpm add --save-dev tsx

Now create whoami.ts:

{@includeCode ../cli/src/example-whoami.ts}

Run it like this:

$ VERCEL_TEAM_ID=<team_id> VERCEL_TOKEN=<token> pnpm tsx ./whoami.ts
Running as: vercel-sandbox
Working dir: /vercel/sandbox

Now have a look at the sidebar for which classes exist.

Limitations

  • Sandbox only supports cloning public repositories at the moment.
  • sudo is not available. User code is executed as the vercel-sandbox user.
  • Max resources: 2 cores, 4096 MiB of memory.
  • All APIs of the SDK are subject to change. We make no stability promises.

System

The base system is an Amazon Linux 2023 system with the following additional packages installed.

bind-utils
bzip2
findutils
git
gzip
iputils
libicu
libjpeg
libpng
ncurses-libs
openssl
openssl-libs
procps
tar
unzip
which
whois
zstd
  • The node22 system ships a Node 22 runtime under /vercel/runtimes/node22.
  • User code is executed as the vercel-sandbox user.
  • /vercel/sandbox is writable.

FAQs

Package last updated on 20 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts