CLI reference / sandbox / exec

stado sandbox exec

Invocation

stado sandbox exec [OPTIONS] <ID> <COMMAND>

Purpose

Run a command in a sandbox and print its exit code, signal and output; a command that does not succeed fails this one with its code. With --detach it starts in the background and its process id is printed

Required inputs and options

Input or optionContract
<ID>The sandbox id Boat answered at create, fork or list
<COMMAND>The command line, as one argument, run by the sandbox's shell
--cwd <CWD>Directory in the sandbox the command runs in; without it the request names none and Boat chooses
--detachStart the command in the background and print its process id at once, for `stado sandbox process status` and `process stop`

Output and state effect

It performs the operation described above and emits its operator result on standard output or standard error. Any state change is limited to the resources and records named by the purpose and options on this page.

Refusals

  • Before dispatch, Stado refuses a missing required token shown in the invocation, an unknown option, or a value outside a listed value set; argument-usage failures exit with code 2.