Commands that return structured API data support four output formats.
| Format | For |
|---|---|
table | reading (default) |
json | piping into jq |
yaml | piping into anything that reads YAML |
text | shell loops — tab-separated, no header, no colour |
Select one per command, save it to the profile, or set it in the environment:
sim tables get tbl_9f3c1a05d4b7426e8c2f0917ab35de64 --output json
sim configure --set-output json
SIM_OUTPUT=yaml sim logs list > logs.yaml--output works before or after the command.
What each format emits
json and yaml emit the API's raw values, not the table's formatting — a
duration stays 1500, not "1.5s".
Paginated lists include the rows under data and the continuation cursor under
nextCursor. A null cursor means no pages remain:
{ "data": [{ "runId": "9c4f0b7e-2d81-4a35-b6e9-70f1c8a2d543" }], "nextCursor": null }Read list rows with jq '.data[]' and check for more pages with jq '.nextCursor'.
table formats for reading: timestamps without milliseconds, sizes as 4.2 MB,
booleans as yes/no, costs as $0.0142. Long cells are clipped to keep rows
on one line; switch to json for the full value.
text uses the rendered cells, tab-separated, with no header or colour:
SIM_OUTPUT=text sim files list | while IFS=$'\t' read -r id name folder size type uploader uploaded; do
echo "$id $name"
doneAn absent value is an em-dash in table and an empty field in text.
Reading a run in detail
sim logs get prints a concise summary. Add --trace for the recursive trace
with span inputs, outputs, errors, timing, and cost:
sim logs get 9c4f0b7e-2d81-4a35-b6e9-70f1c8a2d543 --tracejson and yaml always carry the complete response, so --trace is a no-op
there:
sim logs get 9c4f0b7e-2d81-4a35-b6e9-70f1c8a2d543 --output json | jq '.traceSpans'Exceptions
sim profiles and sim configure print local configuration for humans.
sim files get writes the file’s raw content to stdout or --output-file.
sim chat streams reply text in table and text modes. In json or yaml
mode it waits for the finished result and includes the conversation ID.
sim workflows export always emits raw JSON, or YAML when the profile says so,
so that it round-trips through import:
sim workflows export 3a9e21d8-5f47-4c0b-b2ea-91d7c6034ef8 > wf.json
sim workflows import --workflow @wf.json