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.

Functions§

blank_row
Empty line with continuation bar.
check_fail
Health check fail line.
check_pass
Health check pass line.
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.
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.
orderbook_level
An order book level row with price coloring relative to peg.
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.
status_line
Overall status line (healthy / unhealthy).
subsection_header
Sub-section header (lighter weight).