Expand description
scriba — Typed CLI output, prompts, and terminal rendering for Rust.
Build clean, structured command-line interfaces with composable output primitives, interactive prompts, styled logging, and optional ASCII banners.
§Features
- 📄 Multi-format rendering: Plain, Text, Markdown, JSON, JSONL
- 🧱 Typed output blocks: Composable primitives for CLI content
- 💬 Interactive prompts (feature:
prompt): Text, confirm, select, multiselect - 🎨 Styled logging (feature:
logger): Verbosity-aware stderr output - 🔤 ASCII art / figlet (feature:
figlet): Banner rendering - ⚙️ Feature-gated integrations: Keep dependencies minimal
§Quick Start
ⓘ
use scriba::{Format, Output, Ui};
fn main() -> scriba::Result<()> {
let ui = Ui::new().with_format(Format::Markdown);
let output = Output::new()
.heading(1, "Hello")
.paragraph("Clean CLI rendering");
ui.print(&output)?;
Ok(())
}Re-exports§
pub use config::ColorMode;pub use config::Config;pub use config::Format;pub use config::Level;pub use envelope::EnvelopeConfig;pub use envelope::EnvelopeFields;pub use envelope::EnvelopeLayout;pub use envelope::EnvelopeMode;pub use envelope::Meta;pub use error::Result;pub use error::ScribaError as Error;pub use output::format_diff_for_scriba;pub use output::parse_diff;pub use output::render_colored_diff;pub use output::Block;pub use output::DefinitionEntry;pub use output::DiffLine;pub use output::DiffLineKind;pub use output::KeyValueEntry;pub use output::Output;pub use output::StatusKind;pub use output::Table;pub use output::TableLayout;pub use output::TextStyle;pub use output::Styled;pub use ui::Ui;