Cinematic ANSI Banners for Rust

Cinematic ANSI Banners for Rust

Source: Dev.to

tui-banner: Instantly Turn Your Rust CLI into a Cinematic Masterpiece! ## What Makes tui-banner So Hardcore? ## How Simple Is the Code? ## Who Is This For? ## Official Website ## One Last Thing... 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. 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: tui-banner 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. 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! 🚀 Templates let you quickly answer FAQs or store snippets for re-use. Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuse COMMAND_BLOCK: 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(()) } Enter fullscreen mode Exit fullscreen mode COMMAND_BLOCK: 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(()) } COMMAND_BLOCK: 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(()) } CODE_BLOCK: 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(); Enter fullscreen mode Exit fullscreen mode CODE_BLOCK: 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(); CODE_BLOCK: 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(); - 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) - 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. - 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) - Rust Developers: Give your command-line tools a high-end, professional launch screen. - TUI Project Authors: Add a touch of ceremony to your ratatui or cursive projects. - 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!