Output Formats¶
bnerd supports three output formats for all list and get commands. Set the format with the -o or --output flag.
Table (Default)¶
Human-readable table format with colored status indicators:
ID NAME KIND SERIAL
a1b2c3d4-... example.com. Master 2024010101
e5f6g7h8-... test.org. Master 2024010102
Table output includes:
- Column headers
- Aligned columns
- Colored status indicators (green for active, red for error, yellow for pending)
- Truncated values for long fields
JSON¶
Machine-readable JSON, indented for readability:
JSON output is ideal for:
- Piping to
jqfor data extraction - Storing results in files
- Processing in scripts
Using with jq¶
# Get just the zone names
bnerd dns zones list -o json | jq -r '.[].name'
# Count zones
bnerd dns zones list -o json | jq 'length'
# Filter by kind
bnerd dns zones list -o json | jq '[.[] | select(.kind == "Master")]'
YAML¶
YAML format output:
Setting a Default Format¶
To always use JSON output, set it in your config:
Or via environment variable:
You can still override per command with the -o flag.
Debug Output¶
Enable debug mode to see HTTP request/response details alongside normal output:
Debug output goes to stderr, so it won't interfere with JSON/YAML piping: