Output and input formats
Found this helpful? Share it:
Found this helpful? Share it:
The CLI has four output formats and several ways to pass input. Switch
the output with the -o flag 📋
table: human-readable columns, the default when
output goes to a terminal. For workspace list the columns
are ID and NAME:
$ idapt workspace list
ID NAME
01jqz8h9k2m3n4p5q6r7s8t9v0 Personal
01jqz8p7r6t5w4x3y2z1a0b9c8 Team Alphajson: a JSON array, the default when output is piped.
$ idapt workspace list -o json
[{"id":"01jqz8h9k2m3n4p5q6r7s8t9v0","name":"Personal"}]jsonl: one JSON object per line, best for streaming and line-by-line processing.
$ idapt workspace list -o jsonl
{"id":"01jqz8h9k2m3n4p5q6r7s8t9v0","name":"Personal"}
{"id":"01jqz8p7r6t5w4x3y2z1a0b9c8","name":"Team Alpha"}quiet: just the id of the affected resource, one per line. Ideal for capturing an id in a script.
$ idapt workspace list -o quiet
01jqz8h9k2m3n4p5q6r7s8t9v0
01jqz8p7r6t5w4x3y2z1a0b9c8The CLI detects whether output is a terminal or a pipe. In a pipe it
defaults to JSON, so you rarely need -o json by hand.
Create and update commands accept input several ways:
Named flags: --name "My Agent"
Inline JSON: --json '{"name":"Reviewer"}'
JSON from stdin: echo '{...}' | idapt agent create --json -
JSON from a file: idapt agent create --json @agent.json
Reach for --json @file or --json -whenever
a value contains quotes, newlines, or code. The file form skips shell
escaping entirely, so nothing in the payload is reinterpreted by your
shell.
Pull one field out of a list with jq:
idapt agent list -o json | jq '.[].name'Create a resource from a JSON file:
idapt agent create --json @agent.jsonLoop over ids from quiet output:
idapt drive list -o quiet | while read -r id; do
echo "processing $id"
doneRelated articles
Was this helpful?