junior snapshot create
Use junior snapshot create when your deployment needs the sandbox runtime dependencies ready before the app starts handling work. This is the command you wire into build-time snapshot warmup.
Run it from a project that already has @sentry/junior installed:
pnpm exec junior snapshot createThe command takes no extra arguments.
What it does
Section titled “What it does”Before resolving the snapshot, the CLI inspects the loaded plugins and summarizes the snapshot inputs:
- Plugin names
- Runtime system dependencies
- Runtime npm dependencies
- Runtime postinstall commands
It then resolves the sandbox snapshot profile, reuses a cached snapshot when possible, or rebuilds the snapshot when the profile changed.
Example output
Section titled “Example output”Typical logs look like this:
Loaded plugins (2): agent-browser, notionSandbox snapshot inputs: plugins=1 system_dependencies=1 npm_dependencies=1 postinstall_commands=1Snapshot plugins (1): agent-browserSystem dependencies (1): gtk3NPM dependencies (1): agent-browser@latestRuntime postinstall (1): agent-browser installResolving sandbox snapshot profile...Building sandbox snapshot...Sandbox snapshot create complete: runtime=node22 resolve_outcome=rebuilt cache_hit=false dependency_count=2 profile_hash=abc snapshot_id=snap_123 rebuild_reason=cache_missIf there is nothing to snapshot, the command still reports the empty profile and completion outcome.
The common case is a Vercel build command:
{ "scripts": { "build": "junior snapshot create" }}Use this when your enabled plugins declare runtime dependencies or postinstall steps that should be prepared ahead of request handling.
Failure behavior
Section titled “Failure behavior”If snapshot resolution fails, the CLI exits non-zero and prints the underlying error:
junior command failed: OIDC missingTreat that as a real deploy blocker. The usual checks are the build environment, REDIS_URL, and any platform auth required for snapshot creation.
Verification
Section titled “Verification”After adding the command to your build:
- Run
pnpm exec junior snapshot createlocally or in CI. - Confirm the final log line includes
Sandbox snapshot create complete. - Verify the reported dependency counts match the plugins you enabled.
Next step
Section titled “Next step”Run junior check before snapshot warmup when you change plugin.yaml or SKILL.md, then wire the command into Vercel from Quickstart.