Skip to main content
Use the --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

Human-readable table format (default)
cpln gvc get
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:
cpln workload get --max 10
  • Default: 50
  • Values less than 1 return all records

Format timestamps with --ts

Control timestamp formatting in text output:
cpln workload get --ts iso
The --ts flag only applies when --output=text.

Disable color with --color

Remove ANSI color codes from output:
cpln gvc get --color=false
Useful for:
  • 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

cpln gvc get production-gvc --output yaml-slim > production-gvc.yaml
Edit the file, then apply:
cpln apply --file production-gvc.yaml

Parse JSON with jq

Extract specific fields:
cpln gvc get my-gvc -o json | jq -r '.spec.staticPlacement.locationLinks[]'

Convert to Terraform

Export existing resources to Terraform format:
cpln gvc get my-gvc -o tf > main.tf
cpln workload get my-app --gvc my-gvc -o tf > main.tf

Troubleshooting output

Text output truncates long values for readability. Use json or yaml to see complete data:
cpln gvc get my-gvc --output json
Disable color for cleaner logs:
cpln <command> --color=false
Or redirect stderr to remove color automatically:
cpln <command> 2>&1 | tee output.log
Limit output with --max:
cpln workload get --max 20
Or use query filters to narrow results:
cpln workload query --tag environment=production

Next steps