Skip to main content
porter sandbox contains commands for interacting with sandboxes on a Porter cluster.

Prerequisites


porter sandbox exec

Runs a single non-interactive command inside a sandbox and prints its stdout and stderr. Use this for scripting, CI/CD steps, and automated agents that need to run a command in a running sandbox and act on the result. Usage:
Options: There are two ways to pass a command:
  • Positional, after -- — argv is sent verbatim with no shell involved. Use this when you want predictable argument handling.
  • -c/--command "<string>" — the string is wrapped in sh -c inside the sandbox, so shell features like pipes, &&, redirects, and globs work.

Exit codes

porter sandbox exec propagates the sandbox process’s exit code so CI/CD pipelines and agents can branch on the result:
Interactive (-i) and TTY (-t) flags are reserved for a future release. Passing them today exits with code 2 and a “not yet supported” message.