Skip to main content

Crate rtb_tui

Crate rtb_tui 

Source
Expand description

Reusable TUI building blocks for RTB-built CLI tools.

Three pieces:

  • Wizard / WizardStep — multi-step interactive form with escape-to-back navigation, backed by inquire.
  • render_table / render_json — uniform structured-output helpers used by the v0.4 rtb-cli ops subtrees behind a global --output text|json flag.
  • Spinner — TTY-aware progress indicator that no-ops when stderr isn’t a terminal (CI logs, MCP transports).

See docs/development/specs/2026-05-06-rtb-tui-v0.1.md for the authoritative contract.

Structs§

Spinner
TTY-aware spinner.
Wizard
Async multi-step interactive form.
WizardBuilder
Builder for Wizard.

Enums§

InquireError
Re-export so downstream consumers (and WizardStep impls) can ?-propagate without adding inquire as a direct dependency. Possible errors returned by inquire prompts.
RenderError
Failure modes for crate::render_json.
StepOutcome
Outcome of a single WizardStep::prompt call.
WizardError
Failure modes for crate::Wizard.

Traits§

WizardStep
One stage in a Wizard.

Functions§

render_json
Render rows as a pretty-printed JSON array (one element per row, two-space indent, trailing newline).
render_table
Render rows as a tabled text table with the canonical v0.1 style. Returns the rendered string with a trailing newline so callers can print! directly.