Skip to main content

Crate sparcli

Crate sparcli 

Source
Expand description

sparcli is a lightweight, cross-platform toolkit for styled command-line output and interactive input widgets.

It renders directly to the terminal via crossterm (no ratatui dependency) but mirrors ratatui’s familiar vocabulary (Style, Color, Span, Line, Text). Output widgets implement Renderable and can be printed inline; input widgets run small, self-contained prompt loops.

The base crate stays small; heavier features live behind cargo features (markup, fuzzy, pager).

Re-exports§

pub use core::border::BorderType;
pub use core::geometry::Align;
pub use core::geometry::Edges;
pub use core::geometry::Position;
pub use core::geometry::Title;
pub use core::geometry::VAlign;
pub use core::render::Renderable;
pub use core::render::Rendered;
pub use core::style::Attribute;
pub use core::style::Color;
pub use core::style::Modifier;
pub use core::style::Style;
pub use core::text::Line;
pub use core::text::Span;
pub use core::text::Text;
pub use core::theme::Theme;
pub use core::theme::set_theme;
pub use core::theme::theme;
pub use error::Result;
pub use error::SparcliError;
pub use output::alert::Alert;
pub use output::alert::AlertKind;
pub use output::badge::Badge;
pub use output::columns::Columns;
pub use output::diff::Diff;
pub use output::kv::KeyValue;
pub use output::list::List;
pub use output::list::Marker;
pub use output::live::Live;
pub use output::multiprogress::MultiProgress;
pub use output::panel::Panel;
pub use output::progress::ProgressBar;
pub use output::progress::ProgressStyle;
pub use output::progress::Thresholds;
pub use output::rule::Rule;
pub use output::spinner::Spinner;
pub use output::spinner::SpinnerStyle;
pub use output::table::Cell;
pub use output::table::Column;
pub use output::table::Table;
pub use output::tree::Tree;
pub use output::tree::TreeNode;
pub use output::pager::Pager;
pub use input::Outcome;
pub use input::confirm::Confirm;
pub use input::datepicker::Date;
pub use input::datepicker::DatePicker;
pub use input::editor::edit_file;
pub use input::history::History;
pub use input::number::NumberInput;
pub use input::password::PasswordInput;
pub use input::select::Select;
pub use input::shortcut::Shortcut;
pub use input::text::TextInput;
pub use input::textarea::Textarea;
pub use input::fuzzy::FuzzySelect;

Modules§

core
Foundational building blocks shared by the output and input layers.
error
Error and result types shared across the crate.
input
Interactive input widgets (prompts).
output
Printable output widgets.
prelude
Commonly used types, re-exported for use sparcli::prelude::*;.