orbotodocs
API & CLI

CLI JSON output

The one convention behind every --json flag of the orboto CLI: a single document on stdout, an items envelope for lists, ISO times, and which commands follow it.

Added in v0.221.11 --json is the machine form of a command. The native CLI and the skill wrapper follow one convention, so a script or an agent can predict the shape before it parses.

The rules

  • One document. --json prints exactly one JSON document on stdout and nothing else there. Hints, notes and warnings go to stderr, and exit codes are what they are without --json. The one exception is a stream: messages --follow --json prints one JSON object per line.
  • One resource is the object itself, with the API's field names: ticket KEY --json (the same object as --full), whoami --json, ticket create --json, comment --json and messages --id <id> --json.
  • A list is {"items": [...]}. The rows sit under items. Facts about the list sit beside them, never inside a row: more (the --limit cut the list), nextCursor, owner, sessionId, counts. A list is never a bare array and never a domain key such as sessions or messages.
  • Times are ISO 8601. Rows the CLI builds carry UTC instants with milliseconds, for example 2026-10-16T16:12:50.040Z. Objects passed through from the API keep the API's own timestamp strings.

What the commands print

Command--json prints
ticket KEY --jsonthe ticket object
ticket list KEY --json, ticket mine --json{ items: [{ key, title, status, priority, assignees, createdAt, updatedAt }], more }
who --json{ items: [one row per live session], owner }; owner only with --for
messages --json, messages --all{ items: [messages], counts, peek?, sessionId }
messages --id <id> --jsonthe message object
comment KEY "..." --jsonthe comment object (ticketKey, webUrl, mentions, unresolvedMentions)
orboto ticket list ACME --json | jq '.items[] | .key'
orboto messages --id MESSAGE-ID --json | jq .subject
orboto who --for "asset pipeline" --json | jq '.owner, (.items | length)'

A few other list commands still print a bare array or a list under their own key (comments, search, agents, agent list, agent-wakes, doc list, work-sessions, wiki runs). Their envelope is a separate change; parse them as they print today.

ticket list lists the newest change first. --sort created lists the newest tickets first, the same as sort=created on the API and in the MCP tool orboto_list_tickets.

See also

On this page