Skip to content
Dashboard

Vercel Sandbox now supports managed npm credentials

Vercel Sandbox can now install your team's private npm packages using credentials stored in team Shared Environment Variables. Custom registries such as GitHub Packages and JFrog Artifactory are also supported.

Pass credentials: { npm: true } when creating a sandbox to let it use your team's existing npm credentials.

index.js
import { Sandbox } from "@vercel/sandbox";
const sandbox = await Sandbox.create({ credentials: { npm: true } });
// Clone or copy project files into the sandbox's working directory first.
await sandbox.runCommand("pnpm", ["install"]);

Create a sandbox with managed npm credentials for private package installs.

Tokens stay outside the sandbox. The firewall adds authentication to install requests sent to your configured registries, so a coding agent can install dependencies without seeing the tokens.

Update your Sandbox SDK or CLI to the latest version.

terminal.sh
pnpm add @vercel/sandbox@latest

Upgrade the Sandbox SDK or CLI.

Read the npm credentials documentation to get started.

Reference Architecture

Choose a stack and work through the decisions behind it, with curated documentation, guides, templates, and courses to help you build.

  • Agent stack: Build and operate agents with models, tools, and durable workflows.
  • Web applications: Choose rendering, data, authentication, and caching approaches.
  • Backends: Choose a runtime, connect services, and run background work.

Browse all stacks

Build with prompts

Build an app, extend an agent, or improve your project with ready-to-use prompts for your coding agent.