ReferencesCLIMachine output

Machine-readable Output and Exit Codes

JSON result

--json emits one schema-v1 result:

{
  "ok": true,
  "data": {},
  "error": null,
  "meta": {
    "schemaVersion": "1",
    "command": "labs.validate",
    "cliVersion": "0.0.22"
  }
}

Failures use the same envelope with ok: false, data: null, and a structured error.

JSONL progress

--json-stream emits ordered newline-delimited events. Every event includes:

  • type
  • monotonically increasing seq
  • timestamp
  • command
  • stage
  • message
  • optional percentage

The stream finishes with exactly one terminal result event.

Exit codes

CodeMeaning
0Success
1Operation or internal failure
2Invalid command usage
3Authentication or permission failure
4Resource not found
5Invalid content or validation failure
6Conflict, including immutable-version conflicts
7Capability unavailable in this environment
130Cancellation

A command remains present across Desktop, Studio, local terminals, and CI even when the current environment cannot provide its capability. In that case it exits with 7.

Global flags

Global flags may appear before or after subcommands:

biosimulant --json labs validate ./lab
biosimulant labs validate ./lab --json

Use --legacy-json only during migration from an older machine contract.