Output formats

Commands that return structured API data support four formats. JSON is the default.

FormatOutput
jsonRaw field names and values for scripts, agents, and jq
tableFormatted values for reading in a terminal
yamlRaw values for YAML consumers
textFormatted, tab-separated values without color or a list header

Select a format for one command, save a default, or use an environment variable:

sim tables get tbl_9f3c1a05d4b7426e8c2f0917ab35de64 --output table
sim configure --set-output table
SIM_OUTPUT=yaml sim logs list > logs.yaml

--output can appear before or after the command. Commands use it when their action supports formatted output; the exceptions are listed below.

What each format emits

JSON and YAML

Machine formats preserve API values: a duration remains 1500, rather than the display string "1.5s". Single-resource API responses are unwrapped from their outer data envelope. Cursor-paginated results retain rows under data and the continuation under nextCursor:

{ "data": [{ "runId": "9c4f0b7e-2d81-4a35-b6e9-70f1c8a2d543" }], "nextCursor": null }

Read rows with jq '.data[]' and check .nextCursor for continuation. A null cursor means pagination is finished; inspect any command-specific truncation flags or notices too. See Pagination for limits and memory behavior.

Tables and text

Tables show UTC timestamps without milliseconds, formatted sizes, yes/no booleans, and formatted monetary amounts. Each command's reference specifies its units. Long table cells are clipped to one line; use JSON or YAML to inspect the returned value in full.

Text uses the same formatted cells, flattened to one line and separated by tabs. Lists have no header or color; single records use a label and value on each line. Text values are not clipped to the table's column width:

sim files list --output text | while IFS=$'\t' read -r id name folder size type uploader uploaded; do
  printf '%s %s\n' "$id" "$name"
done

An absent value displays as an em dash in a table and an empty field in text. Use JSON when field types or empty-field positions matter.

Separate results and diagnostics

Results go to stdout. Errors, progress, update notices, and operational notes go to stderr, so this pipe receives only the result:

sim logs list --output json | jq '.data[]'

In JSON/YAML mode, API errors use an error object on stderr with code, message, and optional details. Configuration errors, argument-parser errors, and some command outcome messages remain text. See Exit codes before branching on a command's outcome.

Reading a run in detail

In table mode, sim logs get prints a summary. Add --trace to print recursive spans with inputs, outputs, errors, timing, and cost:

sim logs get 9c4f0b7e-2d81-4a35-b6e9-70f1c8a2d543 --trace --output table

JSON and YAML include the returned trace without --trace; the flag does not change those formats:

sim logs get 9c4f0b7e-2d81-4a35-b6e9-70f1c8a2d543 --output json | jq '.traceSpans'

Exceptions

CommandOutput behavior
sim configurePrints local settings as text
sim profilesHonors --output; JSON includes an active boolean
sim telemetry status, enable, disableAlways print text
sim files getStreams file content to stdout; --output-file saves content and prints a save receipt
sim chatStreams reply text in table/text modes and prints the conversation ID to stderr; JSON/YAML wait for the finished result including that ID
sim workflows exportEmits YAML when selected; otherwise emits JSON, including in table/text mode

File downloads refuse binary content on an interactive terminal. Pipe stdout or use --output-file; overwriting an existing output file requires --force.

Workflow import accepts JSON. Pin that format when exporting a file you plan to import, even if your profile prefers YAML:

sim workflows export 3a9e21d8-5f47-4c0b-b2ea-91d7c6034ef8 --output json > wf.json
sim workflows import --workflow @wf.json