boxy_cli/
lib.rs

1//! # Boxy CLI
2//!
3//! A Rust library for creating beautifully styled text boxes in command-line interfaces.
4//!
5//! `boxy-cli` provides an easy way to create and display text boxes with various [border styles](./constructs/enum.BoxType.html),
6//! [colors](https://docs.rs/colored/latest/colored/), and [alignment](./constructs/enum.BoxAlign.html) options. It's perfect for creating eye-catching CLI applications,
7//! status displays, or simply organizing text output in a visually appealing way.
8//!
9//! ## Features
10//!
11//! - Multiple [border styles](./constructs/enum.BoxType.html) (single, double, bold, rounded, etc.)
12//! - Colored borders and text using [hex color codes](https://docs.rs/colored/latest/colored/)
13//! - Customizable [internal and external padding](./constructs/struct.BoxPad.html)
14//! - Text [alignment](./constructs/enum.BoxAlign.html) options (left, center, right)
15//! - Support for [multiple text segments](./boxer/struct.Boxy.html#method.add_text_sgmt) with dividers
16//! - Builder pattern for fluent API usage
17//! - Dynamic sizing based on terminal dimensions
18//!
19//! ## Quick Start
20//!
21//! ```rust
22//! use boxy_cli::prelude::*;
23//!
24//! fn main() {
25//!     // Create a text box with fluent builder API
26//!     Boxy::builder()
27//!         .box_type(BoxType::Double)
28//!         .color("#00ffff")
29//!         .add_segment("Hello, Boxy!", "#ffffff", BoxAlign::Center)
30//!         .add_segment("A beautiful CLI box library", "#32CD32", BoxAlign::Center)
31//!         .padding(BoxPad::uniform(1), BoxPad::vh(1, 2))
32//!         .build()
33//!         .display();
34//! }
35//! ```
36//!
37//! # Detailed docs
38//! See the [Boxy](./boxer/struct.Boxy.html) struct or the [BoxyBuilder](./boxer/struct.BoxyBuilder.html) struct for more information.
39//!
40//! ## Usage Examples
41//!
42//! See the [README](https://github.com/BastaMasta/boxy-cli) for more examples and usage information.
43
44pub mod boxer;
45pub mod templates;
46pub mod macros;
47pub mod constructs;
48pub mod prelude;
49
50// Re-export prelude at crate root
51pub use prelude::*;