Skip to main content

Module ui

Module ui 

Source
Expand description

Minimal terminal-output helpers for the podbox CLI.

Contract (REVIEW.md “Output and error contract”):

  • Read commands print data on stdout; diagnostics always go to stderr.
  • step/ok are human progress lines: suppressed by --quiet.
  • warn, hint, and error are always shown.
  • Colors use owo-colors + supports-color, which honor NO_COLOR.

This module is intentionally not a framework: plain functions, no macros, no global logger. Verbosity beyond progress lines goes through tracing.

Functions§

error
Print the top-level error line to stderr (never suppressed).
hint
Print an actionable hint block to stderr (never suppressed).
is_quiet
is_verbose
True when any --verbose level is active. Long-running child processes (podman build/pull) stream their output to the terminal in this mode instead of being captured to the build log.
ok
Print a success line (“✔ msg”) to stderr unless quiet.
set_quiet
Enable/disable quiet mode (wired to the global --quiet flag).
set_verbose
Store the -v count (0 = info, 1 = debug, 2+ = trace).
step
Print a progress line (“→ msg”) to stderr unless quiet.
warn
Print a warning to stderr (never suppressed).