Problem Statement
sandbox get and status output human-readable colored text with no machine-readable format option. Programmatic callers (Go, Rust, shell scripts) must parse ANSI-colored output and strip escape codes to extract sandbox details and gateway status.
sandbox list and provider list already support --output json/yaml/table via the OutputFormat enum. sandbox get and status do not.
Remaining Gaps
| Command |
Current |
Gap |
sandbox list |
Has --output json/yaml/table |
None |
provider list |
Has --output json/yaml/table |
None |
sandbox get |
Human-readable colored text only |
No --output flag |
status |
Human-readable colored text only |
No --output flag |
Proposed Design
Add --output json/yaml to sandbox get and status using the existing OutputFormat enum and sandbox_to_json helper.
sandbox get --output json:
{"id":"abc-123","name":"happy-fox","phase":"Ready","labels":{},"resource_version":42,"created_at":"2026-06-21 10:00:00","current_policy_version":2}
status --output json:
{"gateway":"podman-test","server":"http://127.0.0.1:8090","status":"connected","version":"0.0.66"}
Alternatives Considered
- Use the Python SDK — Works for Python callers. The SDK returns structured
SandboxRef objects for get and list.
- Parse CLI output — Current approach for non-Python callers. Works but fragile.
Agent Investigation
sandbox get renders at run.rs:2535 with println! calls, no format flag
status renders at run.rs:507 with println! calls, no format flag
OutputFormat enum and print_output_collection helper in output.rs are reusable
sandbox_to_json() at run.rs:3352 already serializes sandbox objects to JSON
Problem Statement
sandbox getandstatusoutput human-readable colored text with no machine-readable format option. Programmatic callers (Go, Rust, shell scripts) must parse ANSI-colored output and strip escape codes to extract sandbox details and gateway status.sandbox listandprovider listalready support--output json/yaml/tablevia theOutputFormatenum.sandbox getandstatusdo not.Remaining Gaps
sandbox list--output json/yaml/tableprovider list--output json/yaml/tablesandbox get--outputflagstatus--outputflagProposed Design
Add
--output json/yamltosandbox getandstatususing the existingOutputFormatenum andsandbox_to_jsonhelper.sandbox get --output json:{"id":"abc-123","name":"happy-fox","phase":"Ready","labels":{},"resource_version":42,"created_at":"2026-06-21 10:00:00","current_policy_version":2}status --output json:{"gateway":"podman-test","server":"http://127.0.0.1:8090","status":"connected","version":"0.0.66"}Alternatives Considered
SandboxRefobjects forgetandlist.Agent Investigation
sandbox getrenders atrun.rs:2535withprintln!calls, no format flagstatusrenders atrun.rs:507withprintln!calls, no format flagOutputFormatenum andprint_output_collectionhelper inoutput.rsare reusablesandbox_to_json()atrun.rs:3352already serializes sandbox objects to JSON