Skip to content

[sandbox-cli] Add managed npm credentials flag - #439

Open
erulkey wants to merge 3 commits into
scubbo/managed-credentials-16-documentationfrom
erulkey/npm-credentials-cli
Open

erulkey wants to merge 3 commits into
scubbo/managed-credentials-16-documentationfrom
erulkey/npm-credentials-cli

Conversation

@erulkey

@erulkey erulkey commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Teams with npm credentials stored in Vercel need a CLI option to use them in a Sandbox. Add the bare --npm-credentials flag to sandbox create, sandbox run, and sandbox sh, backed by SDK support for credentials: { npm: true }.

sandbox create --npm-credentials

npm-only requests require no Git repository or GitHub identity and keep the normal resource defaults. The review shows npm access before creation; scripts use --yes. Saved configurations and retry commands preserve the npm setting. Missing credentials produce setup instructions for NPM_TOKEN or NPM_RC instead of a generic rejection. Includes CLI help, examples, the Sandbox skill, and package changesets.

Dependencies: This PR is based on vercel/sandbox#435, the end of the existing managed-credentials CLI stack. Review against that base. Do not release until vercel/api#103708 has merged, Security has approved the backend, and the feature is enabled for the intended projects. The existing --enable-managed-credentials GitHub defaults are unchanged; combined access requires both flags.

Validation: 727 CLI tests and 456 SDK tests passed (83 SDK tests skipped), SDK/CLI typechecks and builds passed. After tightening the SDK type to reject empty credential objects, 147 affected tests, six compile-time assertions, typechecks, and builds passed again. Executed the built CLI with a mocked API to verify the npm request body, no creation during dry-run, and actionable missing-credentials output. A live private-package install remains untested pending the backend rollout.

@vercel

vercel Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sandbox Ready Ready Preview, v0 Nov 3, 2026 5:00pm UTC
sandbox-cli Ready Ready Preview, v0 Nov 3, 2026 5:00pm UTC
sandbox-sdk-ai-example Ready Ready Preview, v0 Nov 3, 2026 5:00pm UTC
workflow-code-runner Ready Ready Preview, v0 Nov 3, 2026 5:00pm UTC

This branch was successfully deployed

4 active deployments
Preview – sandbox — 9c1dec48 Deployed Nov 3, 2026 by vercel[bot]
Preview – sandbox-sdk-ai-example — 9c1dec48 Deployed Nov 3, 2026 by vercel[bot]
Preview – workflow-code-runner — 9c1dec48 Deployed Nov 3, 2026 by vercel[bot]
Preview – sandbox-cli — 9c1dec48 Deployed Nov 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant