tui-banner: Instantly Turn Your Rust CLI into a Cinematic Masterpiece!
Have you ever, while coding away in your terminal, fantasized about your program launching with a jaw-dropping ASCII/ANSI spectacle? Warped fonts, glowing gradients, cyberpunk aesthetics, a Matrix-style digital rain... a level of ceremony that's off the charts!
That dream is now a reality—because tui-banner has arrived! This is a zero-dependency, pure Rust library for generating terminal banners, a "visual nuke" crafted specifically for CLI/TUI applications. In just a few lines of code, you can transform your terminal's launch screen into a Hollywood-grade work of art.
What Makes tui-banner So Hardcore?
- Zero Dependencies: Relies on no external crates. No need to install fonts or download Figlet files. Your binary stays lean and mean.
- Truecolor Support: Flawless support for Truecolor (24-bit) and ANSI256 colors, delivering silky-smooth transitions that far surpass traditional ANSI art.
- Figlet Font Rendering: Comes with a built-in classic Figlet font engine, supporting all standard Figlet fonts.
- Preset Styles: Includes 14 hand-picked, cinematic color schemes ready to use with a single line of code:
- Matrix (The classic green-and-black cyber digital rain)
- Neon Cyber (Vibrant neon cyberpunk)
- Aurora Flux (An ethereal, aurora-like shimmer)
- Deep Space (A vast, deep-space nebula)
- Ocean Flow (The fluid motion of the ocean)
- Sunset Neon (A blazing neon sunset)
- Fire Warning (An intense fire alert)
- Warm Luxury (Elegant and warm gold tones)
- Forest Sky (The serene mood of a forest canopy)
- Earth Tone (Natural, earthy colors)
- Chrome (Sleek metallic chrome)
- Royal Purple (Rich and royal purple)
- CRT Amber (Classic CRT amber-on-black)
- Arctic Tech (A cool, high-tech arctic blue)
- Highly Customizable: Gradients, palettes, fill characters, borders... you have total control to tweak it however you want.
- Blazing Fast: Renders so fast it's practically instantaneous. Your launch screen appears in a flash.
How Simple Is the Code?
use tui_banner::{Banner, Style};
fn main() -> Result<(), tui_banner::BannerError> {
println!();
let banner = Banner::new("RUST CLI")?
.style(Style::Matrix) // Select a style with one line
.render();
println!("{banner}");
Ok(())
}
With just these few lines, your program's launch will feel like a scene from The Matrix!
Want to get even fancier? Try customizing the gradient and font:
let banner = Banner::new("WELCOME")
.font("Big") // Switch to a larger font
.gradient(true) // Enable the gradient
.palette("cyberpunk") // Use a custom palette
.fill("•") // Set a custom fill character
.render();
Who Is This For?
- Rust Developers: Give your command-line tools a high-end, professional launch screen.
- TUI Project Authors: Add a touch of ceremony to your
ratatuiorcursiveprojects. - Open Source Enthusiasts: Make your tool's screenshots instantly eye-catching on GitHub.
- Terminal Aesthetes: For those who believe that even daily coding should be a beautiful experience!
Official Website
Click the link for a visual feast: see all 14 styles rendered, with detailed usage, API documentation, and of course, it's all free and open source.
One Last Thing...
If you're still launching your programs with println!("Hello, world!"), you're seriously missing out.
It's time for your CLI to be the main character of the terminal.
The Rust community has delivered another "make-you-scream-with-joy" tool. Go star it and light up your terminal! 🚀

Top comments (0)