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.
Formats
Section titled “Formats”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.
| Value | Use it for |
|---|---|
table | Human-readable terminal output (default in a TTY). |
json | Agents, jq, and scripting (default when piped). |
yaml | Config files and diffs. |
csv | Spreadsheets and BI tools. |
hscli conv list --output jsonhscli report conversations --start 2026-05-01 --end 2026-05-31 --output csv > report.csvFilter with --jq
Section titled “Filter with --jq”Apply a jq expression to JSON output without leaving the command:
hscli conv list --status active --jq '.[] | select(.tags[]? == "resolved") | .id'Project with --fields
Section titled “Project with --fields”Trim the payload to just the columns you need — faster, and easier for an agent to read:
hscli conv list --output json --fields id,subject,statusCompose with the shell
Section titled “Compose with the shell”hscli conv list --status active \ --jq '.[] | select(.tags[]? == "resolved") | .id' \ | xargs -I{} hscli conv status {} --set closed