exec
whzbox exec <provider> [-- cmd args...] runs a child process with sandbox environment variables injected.
Syntax
whzbox exec <provider> [-- cmd args...]
whzbox exec <provider> -s "<shell command>"
whzbox exec <provider>
Arguments
| Argument | Required | Values | Description |
|---|---|---|---|
provider | Yes | aws | Sandbox provider kind. |
cmd args... | No | Any child argv | Command to run. Omit it to launch a subshell. |
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
-s, --shell | boolean | false | Treats the single command argument as a shell string and runs /bin/sh -c. |
Behavior
- Reads the cached sandbox directly from the local store.
- Does not refresh tokens.
- Does not prompt for credentials.
- Rejects unknown providers.
- Rejects expired or missing cached sandboxes.
- Appends provider-specific environment variables to the current process environment.
- Propagates the child process exit code.
Environment variables injected for AWS
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_REGIONAWS_DEFAULT_REGION
Output
whzbox exec does not wrap child output. The child process writes directly to the inherited stdout and stderr streams.
Exit behavior
0when the child process exits successfully- child exit code when the child process exits non-zero
1for local execution errors, invalid shell usage, or missing cached sandbox