Expand description
§Terminal Display Helpers
Styled output utilities for rich, user-friendly terminal presentation.
Uses owo-colors for color and unicode box-drawing characters for structure.
All helpers respect non-TTY contexts (piped output) by falling back to plain text.
Long text is automatically word-wrapped to the detected terminal width.
Structs§
- Col
- Column specification for table formatting.
Functions§
- blank_
row - Empty line with continuation bar.
- bullet_
row - A bullet-point row inside a section.
- check_
fail - Health check fail line.
- check_
pass - Health check pass line.
- detail_
row - An indented detail line inside a section (for sub-items like vulnerability descriptions).
- format_
price_ peg - Format a price with color for peg deviation. Green if within 0.1% of target, yellow if within 0.5%, red otherwise.
- info_
row - An informational note row inside a section box.
- is_tty
- Returns
truewhen stdout is an interactive terminal (not piped). - kv_row
- A key-value row inside a section, with aligned values.
- kv_
row_ delta - A key-value row where the value is colored based on positive/negative.
- link_
row - A link row inside a section box.
- numbered_
row - Format an enumerated list item inside a section box.
- orderbook_
level - An order book level row with price coloring relative to peg.
- score_
bar - A visual score bar with color coding.
- section_
footer - Section footer (closing box line).
- section_
header - Section header with colored title and box-drawing underline.
- separator
- A separator row inside a section.
- severity_
label - Severity label with color coding.
- status_
line - Overall status line (healthy / unhealthy).
- subsection_
header - Sub-section header (lighter weight).
- table_
header - Format a table header row inside a section box.
- table_
row - Format a table data row inside a section box.
- terminal_
width - Returns the current terminal width in columns.
- warning_
row - A warning banner inside a section box.
- wrap_
lines - Word-wrap
textso each line fits withincontent_widthcolumns.