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! ๐๐โจ
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?
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?
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!
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
Some comments may only be visible to logged-in visitors. Sign in to view all comments.