Skip to main content

Module format

Module format 

Source
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>.