Want to level up your terminal output with cool animations, progress bars, and fancy ASCII art? This quick guide shows you how to combine three awesome Python libraries to do just that:
pyfiglet β for eye-catching ASCII text banners.
tqdm β for simple, elegant progress bars.
rich β for colorful, animated progress bars and spinners.
Why Care About Terminal Styling?
When building CLI tools or scripts, output styling helps:
Make the experience more engaging.
Provide clear feedback on progress.
Impress your friends π.
Code Example
Hereβs a concise Python script that shows off each libraryβs strength:
import pyfiglet
from tqdm import tqdm
from rich.console import Console
from rich.progress import track
import time
# ---------- 1. ASCII Art ----------
ascii_banner = pyfiglet.figlet_format("Nishkarsh!")
print(ascii_banner)
# ---------- 2. TQDM Progress Bar ----------
print("\n[1] Loading with tqdm:")
for _ in tqdm(range(50), desc="Loading..."):
time.sleep(0.02)
# ---------- 3. Rich Progress Bar ----------
console = Console()
print("\n[2] Fancy Progress with Rich:")
for step in track(range(10), description="Processing tasks..."):
time.sleep(0.1)
# ---------- 4. Rich Spinner / Status ----------
print("\n[3] Animated Spinner with Rich:")
with console.status("[bold green]Finalizing magic..."):
time.sleep(2)
console.print("\n[bold cyan]All done! Your terminal is now beautiful. π[/bold cyan]")
Output:
What Happens Here?
pyfiglet creates a big ASCII banner for the text "Nishkarsh!" β perfect for logos or script headers.
tqdm shows a simple progress bar with a label "Loading..." that fills up as the loop runs.
richβs track() gives a colorful, animated progress bar with the label "Processing tasks...".
rich also lets you create a spinner with a status message (Finalizing magic...) to show a task in progress.
Finally, it prints a colored success message with emoji to celebrate!
How to Run This
Install dependencies:
pip install pyfiglet tqdm rich
Save the script as terminal_magic.py
Run:
python terminal_magic.py
What Else Can You Do?
Combine richβs tables, trees, and markdown for killer CLI apps.
Use pyfiglet for dynamic banners in your CLI projects.
Customize tqdm with colors, nested bars, and more.
Final Thoughts
Adding some style to your terminal output is easier than you think β and it makes your tools so much nicer to use. Give these libraries a try and watch your command line come alive!
Top comments (21)
Looks good π€π―
Thanks a ton, Melody! Really appreciate the support π€π More terminal fun on the way! ππ₯οΈ
Really appreciate it. Thanks
Thanks so much, Melody! I really appreciate your support and enthusiasm. Looking forward to sharing more fun terminal projects together! ππβ¨
Interesting to read
Thanks Nadeem π
Thatβs a great summary! Youβve highlighted some awesome ways to level up CLI apps with style and interactivity.
Thanks so much, Pelo! Glad you liked the summary β making CLI apps both powerful and visually appealing is definitely a game changer!
I knew about Rich but never saw tqdm, look really nice! thank you for showing the picture of them as well
Thanks a lot, SamuraiX! π
Yeah,
tqdm
is such a hidden gem β pairs beautifully with rich for that aesthetic + functional combo. Glad the visuals helped! Let me know if you try something cool with them !!Oh sure would love to! but unfortunately SAT exam is getting too much close to me lol, I have less than 2 weeks till exam, would gladly write any project just for the sake of programming after my exam as I really miss programming
Totally get that, SamuraiX! Best of luck crushing your SAT β programming projects will be waiting for you after, and theyβll be even more fun with a fresh mind. You've got this! πͺ
By the way, what colleges are you aiming for or hoping to get into?
Love this! Using rich and tqdm honestly makes any CLI so much more fun to work with. Have you tried combining richβs tables with pyfiglet headers for full-on dashboards?
Thanks so much! π I totally agree β rich and tqdm can really bring a CLI to life!
And yes β using pyfiglet headers with rich tables is such a power combo! π¨ It gives off those retro looking dashboard vibes in the terminal π
Iβve been experimenting a bit with that setup actually β like displaying a pyfiglet banner as the section title, followed by a well-styled rich.table for stats or task lists. It's surprisingly satisfying to look at!
Might even turn it into a mini dashboard project next. Have you built anything like that yet?
Good job!
Thank you so much! Glad you liked it β more Python terminal magic coming soon! π₯π
Its Awesome
Thanks !!!
pretty cool, i always tweak my scripts with stuff like this - you think nice visuals actually help you stay motivated during long runs or is it just for fun?
Thanks! Honestly, a bit of both. Iβve noticed that having fun visuals like ASCII art or animated progress bars makes long-running scripts feel more engaging. Itβs like adding a little personality to the terminal. Sometimes itβs just aesthetic, but other times it genuinely helps break the monotony and keep me focused. Glad to hear you tweak your scripts too β itβs underrated fun!
Cool