JSON output#
Every command that reports something takes --json and prints one line of
JSON on standard output; warnings and errors stay on standard error. The
layout of each output is published as a JSON Schema
(draft 2020-12), generated from the types odx prints, so the schema and the
output cannot drift apart.
$ odx --json status | jq '.pull_requests[] | select(.state == "merged") | .name'
Stability#
Each output carries a schema number (odx --json dashboard prints a list
of dashboards, each with its own). It changes only when a field is removed
or changes meaning. New fields can appear in any release, so read the fields
you need and ignore the others. The order of keys is not part of the
contract.
Schemas#
Output |
Command |
Schema |
|---|---|---|
|
odx aggregate |
|
|
odx bot |
|
|
odx cache info |
|
|
odx changelog |
|
|
odx check-deps |
|
|
odx daemon status |
|
|
odx dashboard |
|
|
odx diff |
|
|
odx doctor |
|
|
odx env diff |
|
|
odx env list |
|
|
odx glue |
|
|
odx lock –auto-update |
|
|
odx migrate |
|
|
odx migrate own |
|
|
odx migrate pin |
|
|
odx migrate plan |
|
|
odx migrate plan (repository) |
|
|
odx migrate pr |
|
|
odx migrate unpin |
|
|
odx migrate update |
|
|
odx port |
|
|
odx port sweep |
|
|
odx promote |
|
|
odx promote –rollback |
|
|
odx promote –search |
|
|
odx sniff |
|
|
odx stats |
|
|
odx stats –per-addon |
|
|
odx status |
|
|
odx suggest |
|
|
odx sync |
|
|
odx upgrade |
|
|
odx vendor |
|
|
odx verify |
|
|
odx wanted |