| Crates.io | cliux |
| lib.rs | cliux |
| version | 0.5.1 |
| created_at | 2025-10-30 10:19:54.377299+00 |
| updated_at | 2025-12-23 10:48:29.673724+00 |
| description | Styled terminal output made simple — boxes, sections, dividers, and emoji-aware padding for CLI tools. |
| homepage | |
| repository | https://github.com/Pjdur/cliux |
| max_upload_size | |
| id | 1907931 |
| size | 477,733 |
Styled terminal output made simple.
cliux is a lightweight Rust crate for formatting terminal output with clean, readable components — no TUI required. It helps CLI tools present information with structure and style using boxes, sections, dividers, lists, tags, and smart padding.
Boxed — bordered containers with titles and contentSection — titled blocks with horizontal dividersDivider — customizable horizontal linesList — bullet-pointed lists with customizable stylesTag — colored tags with customizable stylesPadding — Unicode-aware padding (emoji-safe)Input — interactive input fields with customizable stylesConfirm — interactive confirmation prompts with customizable stylesuse cliux::Boxed;
fn main() {
Boxed::new("Cliux Boxed")
.content("This code uses the cliux library to create a boxed section.")
.width(61)
.print();
}
use cliux::Label;
fn main() {
Label::new("INFO").style("info").print();
Label::new("✓ Done").style("success").print();
Label::new("ERROR").style("error").print();
}
use cliux::Section;
fn main() {
Section::new("Wrapped Section")
.content("This is a long sentence that will be wrapped intelligently across multiple lines.")
.width(40)
.wrap(true)
.style('─')
.print();
}
use cliux::Divider;
fn main() {
Divider::new(30).style('=').print();
}
use cliux::List;
fn main() {
List::new(vec!["First item", "Second item", "Third item"])
.bullet("*")
.width(40)
.print();
List::new(vec!["One", "Two", "Three"])
.numbered()
.print();
}
use cliux::Tag;
fn main() {
Tag::new("beta").rounded().color("yellow").bold(true).print();
Tag::new("admin").curly().color("red").print();
Tag::new("draft").print();
}
use cliux::Table;
fn main() {
Table::new()
.headers(&["Name", "Status"])
.row(&["cliux", "active"])
.row(&["other", "pending"])
.widths(&[20, 10])
.bordered(true)
.print();
}
use cliux::Note;
fn main() {
Note::new("Be careful with this setting.")
.kind("warning")
.style("rounded")
.width(40)
.print();
Note::new("Tip: You can use --force here.")
.kind("info")
.style("+")
.width(40)
.print();
}
use cliux::Input;
fn main() {
let name = Input::new("What's your name?")
.default("Anonymous")
.bold(true)
.color("cyan")
.style("rounded")
.width(40)
.prompt();
println!("Hello, {}!", name);
}
use cliux::Confirm;
fn main() {
let confirmed = Confirm::new("Delete file?")
.color("red")
.bold(true)
.style("square")
.width(40)
.default(false)
.prompt();
if confirmed {
println!("File deleted.");
} else {
println!("Operation cancelled.");
}
}
Add to your Cargo.toml:
cliux = "0.5.1"










This is an early release. Components and layout may evolve. Contributions and feedback welcome!