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:
{
  "ok": true,
  "data": [ ... ],
  "summary": "Found 3 businesses (page 1/1)",
  "breadcrumbs": ["businesses", "list"],
  "meta": {
    "total": 3,
    "page": 1,
    "pageSize": 25,
    "totalPages": 1
  }
}
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:
{
  "ok": false,
  "data": null,
  "summary": "Not logged in. Run 'nexudus login' first.",
  "breadcrumbs": ["businesses", "list"]
}
Always check ok first before processing data.

Examples

Table mode (default)

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

JSON mode

nexudus businesses list --json
Returns the raw JSON envelope — ideal for piping into jq, processing in scripts, or integrating with other tools:
nexudus products list --json | jq '.data[] | .Name'

Markdown mode

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

Agent mode

nexudus businesses list --agent
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.