Skip to main content
The CLI supports multiple output formats to suit different workflows — interactive terminal use, scripting, data export, and AI agent integration.

Format Selection

The output format is determined by this priority chain:
  1. --raw flag (shorthand for --format json)
  2. --format <type> flag (table, json, csv, markdown)
  3. format: in .ibmi/config.yaml
  4. Auto-detect: table when output is a TTY, json when piped
This means interactive terminal sessions default to human-readable tables, while piped commands automatically switch to machine-parseable JSON.

Table (Default for TTY)

Formatted tables with box-drawing characters, column alignment, and a footer showing the system name, host, row count, and elapsed time.

JSON

Structured JSON envelope with metadata. Default when output is piped to another command.
On error:

NDJSON (Streaming)

One JSON object per row, separated by newlines. Ideal for streaming processing and large result sets.
Process rows incrementally:

CSV

Comma-separated values with a header row. Useful for data export and spreadsheet import.
Export directly to a file:

Markdown

Markdown-formatted table. Useful for documentation, reports, and chat tool output.

File Output

Write output to a file instead of stdout using --output:
Combine with --watch to continuously update a file: