Output formats
The output contract every command shares: formats, fields, and templates.
Every command renders through one formatter, so the same flags work everywhere.
Pick a format with -o, or let pin choose: a table when writing to a terminal,
JSONL when piped.
Formats
pin <command> -o table # aligned columns for reading
pin <command> -o markdown # a Markdown table, for docs and issues
pin <command> -o jsonl # one JSON object per line, for piping
pin <command> -o json # a single JSON array
pin <command> -o csv # spreadsheet friendly
pin <command> -o tsv # tab-separated
pin <command> -o url # just the URL column
pin <command> -o raw # the underlying bytes, unformatted
| Format | Best for |
|---|---|
table |
Reading on a terminal |
markdown |
Pasting into docs, issues, or pull requests |
jsonl |
Piping into another tool, one object at a time |
json |
Loading a whole result as an array |
csv / tsv |
Spreadsheets and quick column math |
url |
Feeding URLs into other commands |
raw |
The unformatted bytes (response bodies) |
Record fields
The JSON field names are the same across formats. They are the columns --fields
selects and the keys a template reads (capitalised). Each record type has its own
set:
| Record | Fields |
|---|---|
| Pin | id, type, title, description, link, url, image, image_width, image_height, dominant_color, is_video, video, alt_text, pinner, board, saves, comments, created |
| Board | id, name, slug, url, owner, description, pins, followers, sections, privacy, cover, created |
| User | id, username, full_name, bio, website, location, followers, following, boards, pins, monthly_views, verified, avatar, url |
| Topic | id, name, slug, followers, url |
| Section | id, title, slug, board_id, pins |
| Ref | input, kind, id, url |
Narrowing columns
Keep only the fields you want:
pin user show pinterestman --fields username,followers,boards
pin user boards pinterestman --fields name,pins,followers
--no-header drops the header row in table and csv output, which helps when
a downstream tool expects bare rows.
Templating rows
For full control over each line, apply a Go text/template. Fields are the JSON keys, capitalised:
pin board show pinterestman/ball-is-life --template '{{.Name}} {{.Followers}}'
Why auto-detection helps
Because the default adapts to the destination, the same command reads well by hand and parses cleanly in a pipe:
pin user boards pinterestman # a table, because this is a terminal
pin user boards pinterestman | wc -l # JSONL, because this is a pipe
You only reach for -o when you want something other than that default.