Skip to main content

Module output

Module output 

Source
Expand description

Shared CLI output formatting.

StructsΒ§

KvRow πŸ”’
ProgressBar
Styled progress bar wrapping indicatif::ProgressBar.
Table
Thin wrapper around tabled::Table with consistent styling.

ConstantsΒ§

ELLIPSIS_LENGTH πŸ”’
FRACTION_EPSILON πŸ”’
MINUTES_PER_HOUR πŸ”’
PROGRESS_TICK_MS πŸ”’
THOUSANDS_GROUP πŸ”’

FunctionsΒ§

banner
Styled banner: β€œName vX.Y.Z”.
blank
Blank line to stderr.
detail
Plain detail line (indented, dim). For multi-line data under a header.
error
Red X prefix.
fmt_duration
Format seconds as human-readable duration: 125.3 -> "2m 5.3s".
fmt_integer
Format an unsigned integer with thousands separators: 1234 -> "1,234".
fmt_integer_signed πŸ”’
fmt_number
Format a float with thousands separators: 1234.56 -> "1,234.56".
fmt_pct
Format a ratio as percentage: 0.2567 -> "25.7%".
header
Bold cyan section header with a leading arrow.
info
Info line (no prefix, no styling). For free-form structured output.
json
Pretty-print a serializable value as JSON to stdout.
kv
Key-value line: dim key, bold value.
kv_fmt
Key-value line with a Display value.
separator
Dim horizontal rule.
subheader
Bold white text with underline.
success
Green checkmark prefix.
table
Render a table to stderr.
truncate
Truncate a string to max characters, appending ... if needed.
warning
Yellow exclamation prefix.