Skip to main content

Crate rskit_cli

Crate rskit_cli 

Source
Expand description

CLI framework: theming, structured output, progress, prompts, and signals.

A parser-agnostic toolkit for building consistent command-line UX: it owns the terminal presentation concerns (color, glyphs, tables, status lines, progress bars), input (interactive prompts with a non-interactive fallback), and cooperative cancellation, so every rskit CLI renders and behaves the same way.

§Modules

Re-exports§

pub use live::LiveConfig;
pub use live::LiveConsole;
pub use live::RegionScreen;
pub use progress::MultiProgress;
pub use progress::ProgressBar;
pub use progress::ProgressStyle;
pub use prompt::Capabilities;
pub use prompt::Choice;
pub use prompt::ChoiceId;
pub use prompt::Key;
pub use prompt::LineTerminal;
pub use prompt::PromptMode;
pub use prompt::Prompter;
pub use prompt::ScriptedTerminal;
pub use prompt::Terminal;
pub use prompt::Validation;
pub use prompt::Validator;
pub use prompt::non_empty;
pub use render::ErrorRenderer;
pub use render::ExitCode;
pub use render::OutputFormat;
pub use render::OutputKV;
pub use render::OutputTable;
pub use render::StatusReporter;
pub use signal::on_ctrl_c;
pub use theme::ColorChoice;
pub use theme::Glyphs;
pub use theme::NO_COLOR_ENV;
pub use theme::Palette;
pub use theme::resolve_color;
pub use theme::resolve_color_with;
pub use theme::unicode_env_enabled;
pub use prompt::RichTerminal;

Modules§

live
Multi-region live terminal rendering.
progress
Progress bar abstractions over indicatif.
prompt
Interactive prompts for guided CLI flows.
render
Structured, non-interactive terminal display.
signal
Ctrl+C / graceful shutdown over tokio_util::sync::CancellationToken.
theme
Visual vocabulary shared by every renderer: color and status glyphs.

Structs§

CancellationToken
A token which can be used to signal a cancellation request to one or more tasks.