Output and scripting
Commands that return resources honour the same output flags, so a command you ran by hand
becomes a command you can pipe without rewriting it. Utility commands sit outside this
contract: the config family prints plain text, and qibdo version carries its own -o
limited to json|yaml|table.
Formats
Section titled “Formats”-o (or --output) selects the format:
qibdo taxonomy workspaces list -o jsonqibdo taxonomy workspaces list -o yamlqibdo taxonomy workspaces list -o tsvWith no -o, the CLI picks by destination: a table on a terminal, json when piped, so a
redirected command already produces machine-readable output. table is meant for reading,
not parsing. json and yaml are the structured formats. tsv is the one to reach for in a
shell pipeline, because it needs no parser:
qibdo taxonomy workspaces list --query '[].name' -o tsv | while read -r name; do echo "workspace: $name"doneProjecting with --query
Section titled “Projecting with --query”--query takes a JMESPath expression and projects the result before
it is printed, which keeps the interesting field out of a downstream jq or awk:
qibdo taxonomy workspaces list --query '[].name' -o tsvOne caveat worth knowing: --query buffers the full result before it can project it. On a
large collection, bound it with --limit so you are not holding every page in memory at once.
Streams
Section titled “Streams”Results go to stdout. Everything else goes to stderr, which is what makes redirecting a command’s output safe even when it is chatty:
qibdo taxonomy workspaces list -o json > workspaces.jsonThe flags that control the noise all act on stderr:
--verboseadds human-readable progress.--debugadds wire-level detail, with credentials redacted.--quiet(or-q) suppresses non-essential output.
Running without a terminal
Section titled “Running without a terminal”Three behaviours change when the CLI is not talking to a human, and each has a flag so you can force the non-interactive shape in a context that only looks interactive, such as a CI runner with a TTY:
--no-inputnever prompts and fails instead. Any command that would have asked a question exits rather than hanging a pipeline.--no-pagerprints long human-readable output straight through instead of paging it.--colortakesauto,always, ornever, and respectsNO_COLOR.
Related
Section titled “Related”- Filtering and pagination
- Standard responses for the shape of the data underneath