Expand description
Visual and DX helpers for the CLI: relative times, status pills, hyperlinks, banners, headers, key/value rows and empty states.
These helpers are the foundation for the CLI’s “beautiful, modern, fun”
design language. Every command should funnel its visual output through
this module rather than reaching for owo_colors directly.
Functions§
- banner
- Print a command banner:
▌ hm <command> · <subtitle>. - duration_
human - Render a duration in seconds as
42s/3m12s/1h05m. - elapsed_
between - Elapsed duration between two epoch timestamps.
- empty_
state - Print an empty-state message: blank line, bold title, dim hint, blank line.
- header
- Print a section header: blank line, bold title, a unicode rule.
- hyperlink
- Render a hyperlink, auto-detecting terminal support.
- hyperlink_
with - Render a hyperlink with explicit support toggle.
- kv
- Print a key/value row, aligned at column 12.
- rel_
time - Render an epoch timestamp as a human-friendly relative time.
- status_
pill - Render a status pill:
"<icon> <status>", both styled in the status color. - step
- Print a single step line:
✓ <verb-dim> <result>.