Skip to main content

Output Modes

Every CLI command supports four output modes, selected via global flags. The default mode produces human-friendly terminal tables.

Available modes

FlagModeBest for
(none)TableInteractive terminal use — rich, formatted tables
--jsonJSONScripting and automation — raw JSON envelope
--mdMarkdownDocumentation and reports — Markdown-formatted tables
--agentAgentAI assistants — JSON envelope with enhanced summary

The output envelope

When using --json or --agent, every command returns a standardised JSON envelope:
FieldDescription
oktrue on success, false on failure
dataThe response payload — an array for list operations, an object for single-entity operations, or null on some failures
summaryA human-readable description of the result
breadcrumbsThe command path that produced the output (e.g., ["products", "create"])
metaPagination metadata (present only on list commands)

Error envelope

When a command fails, the envelope looks like:
Always check ok first before processing data.

Examples

Table mode (default)

Produces a formatted table in your terminal using rich formatting (colours, borders, alignment).

JSON mode

Returns the raw JSON envelope — ideal for piping into jq, processing in scripts, or integrating with other tools:

Markdown mode

Produces Markdown-formatted tables suitable for pasting into documentation, tickets, or chat messages.

Agent mode

Returns the JSON envelope with an enhanced summary field optimised for AI assistant consumption. This is the mode that Agent Skills use to communicate with the CLI.