--output (or -o) flag to choose how command results are displayed. Different formats serve different purposes, from human-readable tables to machine-parseable JSON.
Available formats
- text
- json
- yaml
- json-slim / yaml-slim
- tf
- crd
- names
Human-readable table format (default)Best for:
- Interactive terminal use
- Quick visual scanning
- Development and debugging
Text output may truncate long values. Use
json or yaml for complete data.Output modifiers
Limit results with --max
Control the number of records displayed:
- Default:
50 - Values less than 1 return all records
Format timestamps with --ts
Control timestamp formatting in text output:
The
--ts flag only applies when --output=text.Disable color with --color
Remove ANSI color codes from output:
- Logging to files
- CI/CD environments
- Systems that don’t support colored output
Color is automatically disabled when stdout is not a terminal.
Common use cases
Export a resource for GitOps
Parse JSON with jq
Extract specific fields:Convert to Terraform
Export existing resources to Terraform format:Troubleshooting output
Output is truncated
Output is truncated
Text output truncates long values for readability. Use
json or yaml to see complete data:Color codes in logs
Color codes in logs
Disable color for cleaner logs:Or redirect stderr to remove color automatically:
Too many results
Too many results
Limit output with Or use query filters to narrow results:
--max: