Components
Explore all ZFish components and learn how to use them in your applications.
βοΈArgument Parsing
ComponentCommand-line argument parsing with flags, options, and subcommands
Argument Parsing Example
use zfish::args::Args;
let mut args = Args::new();
args.add_flag("verbose", "Verbose output");
let matches = args.parse()?;Output
Usage: program [OPTIONS]
π¨Colors & Styles
ComponentRich terminal coloring with 16, 256, and true color support
Colors & Styles Example
use zfish::style::Color;
print("Hello", Color::Red);
print("World", Color::Green.bold());Output
HelloWorld
πProgress Bars
ComponentBeautiful progress bars with multiple styles and real-time updates
Progress Bars Example
use zfish::progress::Progress;
let mut progress = Progress::new(100);
progress.set_position(50);Output
[========================= ] 50.0% (50/100)
πTables
ComponentAutomated table rendering with Unicode support and custom styling
Tables Example
use zfish::table::Table;
let mut table = Table::new();
table.add_row(["Name", "Age", "City"]);
table.add_row(["Alice", "25", "NYC"]);
table.print();Output
βββββββββ¬ββββββ¬ββββββ β Name β Age β Cityβ βββββββββΌββββββΌββββββ€ β Alice β 25 β NYC β βββββββββ΄ββββββ΄ββββββ
βInteractive Prompts
ComponentUser-friendly prompts for input, confirmation, and selection
Interactive Prompts Example
use zfish::prompt::Confirm;
let answer = Confirm::new("Continue?")
.prompt()?;Output
? Continue? (y/N) y
πLogger
ComponentStructured logging with levels, colors, and flexible output
Logger Example
use zfish::log::{Logger, Level};
let logger = Logger::new();
logger.info("Application started");Output
[INFO] Application started
π₯οΈTerminal Control
ComponentFull terminal manipulation with cursor control and screen management
Terminal Control Example
use zfish::term;
term::clear_screen()?;
term::move_cursor(10, 5)?;Output
(Terminal screen cleared and cursor moved to position 10,5)
Zero Dependencies
ZFish is built on top of Rust's standard library only
Unlike other CLI frameworks, ZFish has zero external dependencies. This ensures fast compile times, small binary sizes, and maximum compatibility.
β
No dependenciesβ
Fast compilationβ
Small binariesβ
Maximum compatibility