Skip to content

fix(sandbox): use invoked app name in help examples - #269

Open
erulkey wants to merge 1 commit into
mainfrom
fix/help-examples-app-name
Open

fix(sandbox): use invoked app name in help examples#269
erulkey wants to merge 1 commit into
mainfrom
fix/help-examples-app-name

Conversation

@erulkey

@erulkey erulkey commented Jul 29, 2026

Copy link
Copy Markdown

Problem

The CLI can run under two names: standalone sandbox, or embedded in the Vercel CLI as vercel sandbox (the embedding passes appName: 'vercel sandbox' to createApp). The usage line respects that name, but the top-level help examples are hardcoded to the standalone form. So vercel sandbox --help prints:

EXAMPLES:

  Create a sandbox and start a shell
  $ sandbox sh

For Vercel CLI users there is no sandbox binary on PATH, so copy-pasting the CLI's own examples fails with zsh: command not found: sandbox. Hit this today on a fresh first run (Vercel CLI 56.2.0).

Fix

Build the example commands from the same appName the usage line already uses. Standalone output is unchanged.

Verified against the built package:

  • createApp({ appName: "vercel sandbox" }) help now shows $ vercel sandbox sh etc.
  • createApp({ appName: "sandbox" }) output is identical to before.

Not covered here

Subcommand-level examples (create.ts, fork.ts) and runtime hints (format-error.ts, snapshot.ts, args/sandbox-name.ts, logout.ts, cp.ts) also hardcode sandbox .... Those strings are built at module import time, before createApp receives the name, so fixing them needs a small refactor (shared accessor or command factories). Happy to follow up with that if you want it.

@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
sandbox Ready Ready Preview, v0 Jul 29, 2026 10:58pm
sandbox-sdk-ai-example Ready Ready Preview Jul 29, 2026 10:58pm
workflow-code-runner Ready Ready Preview Jul 29, 2026 10:58pm

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.

3 participants