Skip to main content

Module terminal

Module terminal 

Source
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 true when 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 text so each line fits within content_width columns.