Skip to content

Latest commit

 

History

History
42 lines (32 loc) · 1.08 KB

File metadata and controls

42 lines (32 loc) · 1.08 KB

JSON CLI Output

Several Glassbox commands support machine-readable JSON for automation.

Envelope format

When --json is set (or --format json), output is wrapped as:

{
  "schema_version": "1.0",
  "glassbox_version": "0.0.0-dev",
  "generated_at": "2026-06-01T12:00:00Z",
  "command": "debug",
  "data": { }
}

Commands

Command Flags
debug --json, --format json
export --format json
audit:sign --json (schema envelope; legacy output without the flag)
protocol:diagnose --json
generate-bindings --json, --format json
check-bindings --json
config show --json
bench --json

Format validation: --format is validated at startup for all commands that accept it. Unsupported values (e.g. --format yaml) are rejected immediately with an explicit error listing the accepted values.

Example

# debug with JSON output
glassbox debug --wasm ./contract.wasm --json

# export snapshot as JSON envelope
glassbox export --snapshot ./state.snap.json --format json