Expand description
Shared CLI output formatting.
StructsΒ§
- KvRow π
- Progress
Bar - Styled progress bar wrapping
indicatif::ProgressBar. - Table
- Thin wrapper around
tabled::Tablewith 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
Displayvalue. - 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
maxcharacters, appending...if needed. - warning
- Yellow exclamation prefix.