Skip to content
hscli

Output & filtering

Every hscli command shares the same output machinery, so once you learn it for one command you know it for all of them.

Set with --output. It defaults to a table in an interactive terminal and JSON when the output is piped, so scripts get machine-readable data automatically.

ValueUse it for
tableHuman-readable terminal output (default in a TTY).
jsonAgents, jq, and scripting (default when piped).
yamlConfig files and diffs.
csvSpreadsheets and BI tools.
Terminal window
hscli conv list --output json
hscli report conversations --start 2026-05-01 --end 2026-05-31 --output csv > report.csv

Apply a jq expression to JSON output without leaving the command:

ids of conversations tagged resolved
hscli conv list --status active --jq '.[] | select(.tags[]? == "resolved") | .id'

Trim the payload to just the columns you need — faster, and easier for an agent to read:

Terminal window
hscli conv list --output json --fields id,subject,status
close everything tagged resolved
hscli conv list --status active \
--jq '.[] | select(.tags[]? == "resolved") | .id' \
| xargs -I{} hscli conv status {} --set closed