Skip to main content

Module format

Module format 

Source
Expand description

Output rendering for the seven --format= styles (§8 of docs/design.md).

OutputFormat is the controlled vocabulary; RenderOptions carries presentation knobs (color, width). render is the single entry point that dispatches to a per-format module:

  • [human] — tree-rendered, ASCII-bar, width-aware (§8.3).
  • [json_out] — nested envelope, flat envelope, jsonl-items (§7, §7.1, §7.2).
  • [delimited] — TSV and RFC-4180 CSV.
  • [markdown] — Markdown headings + fenced item blocks.

TTY detection, terminal-width detection, NO_COLOR / CLICOLOR_FORCE handling, and provenance lines are the CLI’s responsibility — this module is pure: input is &Envelope, output is String.

Structs§

RenderOptions
Options controlling presentation.

Enums§

OutputFormat
Output format selected by --format=STYLE.

Functions§

render
Render an envelope as the chosen format.