DEV Community

Cover image for πŸš€ Build a Beautiful CLI Dashboard in Python using pyfiglet + rich!!!
Nishkarsh Pandey
Nishkarsh Pandey

Posted on

πŸš€ Build a Beautiful CLI Dashboard in Python using pyfiglet + rich!!!

I have made my terminal awesome!!
Agenda of the post:
Because your terminal deserves to look awesome too! 🎨✨

🧠 Why?
Command-line tools don’t have to be boring. With just a few lines of Python, you can create stunning and interactive dashboards right in your terminal using:

πŸ–Ό pyfiglet for ASCII art headers.
🎨 rich for colorful tables, progress, and layout.
Perfect for monitoring tasks, showing progress, or just flexing your dev setup.

🧰 Requirements
Install these if you haven’t already:

pip install pyfiglet rich
Enter fullscreen mode Exit fullscreen mode

The code:

import pyfiglet
from rich.console import Console
from rich.table import Table
# Initializing rich console
console = Console()
# Creating ASCII art banner
ascii_banner = pyfiglet.figlet_format("CLI Dashboard")
console.print(f"[bold cyan]{ascii_banner}[/bold cyan]")
# Creating a rich table
table = Table(title="πŸ“Š Task Overview", style="bold magenta")
table.add_column("Task", style="cyan", no_wrap=True)
table.add_column("Status", style="green")
table.add_column("Progress", justify="right", style="yellow")
# Adding rows to the table
table.add_row("Data Sync", "βœ… Complete", "100%")
table.add_row("Model Training", "βš™οΈ Running", "76%")
table.add_row("Report Generation", "⏳ Pending", "0%")
# Displaying the table
console.print(table)

Enter fullscreen mode Exit fullscreen mode

Output:

Terminal

πŸ›  Where Can You Use This?

As a dashboard for long-running scripts.
To display task pipelines in ETL/ML workflow.
Status panels for automation scripts.

Or just to look cool while you code 😎

πŸ’‘ Pro Tip
You can combine this with other rich features like:

Live() updates.
Progress bars.
Panels.
Markdown rendering.

Or even make a full-fledged CLI app (see my CLI Task Manager post if you’re curious!).

πŸ’¬ What Do You Think?
Have you used rich or pyfiglet in your CLI tools? What’s your favorite terminal enhancement trick? Share below πŸ‘‡

Top comments (0)