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.
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.
Complete JSON output cpln gvc get --output json
Best for:
Programmatic parsing with jq
Automation scripts
Inspecting all resource properties
View specific field
Format with jq
cpln gvc get my-gvc -o json | jq '.spec.staticPlacement.locationLinks'
cpln workload get -o json | jq -r '.items[].name'
Complete YAML output cpln gvc get --output yaml
Best for:
Human-readable structured data
Inspecting nested configurations
Exporting for documentation
Save to file
Parse with yq
cpln gvc get my-gvc -o yaml > my-gvc.yaml
cpln gvc get -o yaml | yq '.items[].name'
Simplified output without metadata cpln gvc get my-gvc --output json-slim
cpln gvc get my-gvc --output yaml-slim
Removes non-essential properties:
IDs
Versions
Timestamps
System-generated metadata
Best for:
Creating templates for cpln apply
GitOps configurations
Copying resources between environments
cpln gvc get my-gvc -o yaml-slim > gvc-template.yaml
Terraform HCL format cpln gvc get my-gvc --output tf
Best for:
Generating Terraform configurations
Migrating from CLI to Terraform
Infrastructure as Code workflows
See Terraform Provider for details. Kubernetes Custom Resource Definition (K8s CRD) format cpln workload get my-workload --output crd
Best for:
Kubernetes operator workflows
K8s-native GitOps (e.g. ArgoCD)
Hybrid Kubernetes/Control Plane setups
See Kubernetes Operator for details. Resource names only cpln gvc get --output names
Best for:
Scripts and automation
Piping to other commands
Quick listing
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
Control timestamp formatting in text output:
ISO 8601 format
Local timezone
Relative time
cpln workload get --ts iso
cpln workload get --ts local
cpln workload get --ts age
# Output: "2 hours ago"
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:
Get location links
List workload images
cpln gvc get my-gvc -o json | jq -r '.spec.staticPlacement.locationLinks[]'
cpln workload get -o json --gvc my-gvc | \
jq -r '.items[].spec.containers[].image'
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 < comman d > --color=false
Or redirect stderr to remove color automatically: cpln < comman d > 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
Common Options Learn about all shared CLI flags
cpln apply Use slim output for GitOps workflows