DEV Community

Cover image for πŸš€ I Built a Static CLI Dashboard in Python Using rich and pyfiglet – Looks Nerdy, Works Smart πŸ˜ŽπŸ“Š
Nishkarsh Pandey
Nishkarsh Pandey

Posted on

πŸš€ I Built a Static CLI Dashboard in Python Using rich and pyfiglet – Looks Nerdy, Works Smart πŸ˜ŽπŸ“Š

Have you ever wanted your terminal to look like a sci-fi control panel? I did. So, I built a Python-based CLI dashboard that displays system stats and tasks β€” and honestly, it looks sick 😀.

All you need is Python and a few powerful libraries: rich, pyfiglet, and psutil.

(Imagine it glowing in a dark room with you sipping coffee and pretending you’re in a hacker movie 😀)

Hacker1

🧰 Tech Stack
rich: For beautiful layouts, tables, panels, and colors
pyfiglet: For ASCII art headers
psutil: For pulling system-level data
Python's platform,datetime, and console.clear()magic

🧠 Features
πŸ–₯ System Info Panel
Shows your OS, processor, machine type, and boot time in a colorful table.

πŸ“‹ Task Tracker
A visual table for tracking current operations like model training, sync jobs, etc.

✨ Beautiful Layout
Thanks to rich.layout, the dashboard splits into neat sections: Header, Body (left & right), and Footer.

πŸ’‘ Nerdy Footer Message
Because we all need a little "all systems operational πŸš€" motivation.

πŸ” The Code:

import pyfiglet
from rich.console import Console
from rich.table import Table
from rich.panel import Panel
from rich.layout import Layout
from rich.text import Text
import psutil
import platform
from datetime import datetime
# Initialize console
console = Console()
layout = Layout()
# Layout structure
layout.split(
    Layout(name="header", size=3),
    Layout(name="body", ratio=2),
    Layout(name="footer", size=3),
)
layout["body"].split_row(
    Layout(name="left"),
    Layout(name="right"),
)
# ---------- HEADER ----------
ascii_banner = pyfiglet.figlet_format("CLI Dashboard", font="slant")
layout["header"].update(Panel(Text(ascii_banner, justify="center"), style="bold cyan"))
# ---------- LEFT: SYSTEM STATS ----------
def get_system_stats():
    uname = platform.uname()
    boot_time = datetime.fromtimestamp(psutil.boot_time()).strftime("%Y-%m-%d %H:%M:%S")
    stats = Table(title="πŸ’» System Information", title_style="bold magenta")
    stats.add_column("Property", style="cyan", no_wrap=True)
    stats.add_column("Value", style="green")
    stats.add_row("System", uname.system)
    stats.add_row("Node Name", uname.node)
    stats.add_row("Release", uname.release)
    stats.add_row("Version", uname.version)
    stats.add_row("Machine", uname.machine)
    stats.add_row("Processor", uname.processor)
    stats.add_row("Boot Time", boot_time)
    return stats
layout["left"].update(get_system_stats())
# ---------- RIGHT: TASK TABLE ----------
task_table = Table(title="πŸ“‹ Tasks", title_style="bold magenta")
task_table.add_column("Task", style="cyan", no_wrap=True)
task_table.add_column("Status", style="green")
task_table.add_column("Progress", justify="right", style="yellow")
task_table.add_row("Data Sync", "βœ… Complete", "100%")
task_table.add_row("Model Training", "βš™οΈ Running", "76%")
task_table.add_row("Report Generation", "⏳ Pending", "0%")
layout["right"].update(task_table)
# ---------- FOOTER ----------
footer_panel = Panel("[bold cyan]All systems operational. πŸš€\nGenerated by your Python CLI dashboard.[/bold cyan]",
                     title="Status", border_style="blue")
layout["footer"].update(footer_panel)

# ---------- DISPLAY ----------
console.clear()
console.print(layout)

Enter fullscreen mode Exit fullscreen mode

The Output:

Image

Sorry dev's can't share the output because it contains some sensitive information about my machine..

Feel free to copy, customize, and expand it. Maybe add memory usage stats? Integrate with APIs? Animate progress bars?

πŸ§ͺ Demo
Want to see it in action?
Just run:

pip install rich pyfiglet psutil
python dashboard.py

Enter fullscreen mode Exit fullscreen mode

πŸ€” Why Did I Build This?
Honestly, because dashboards in the terminal are satisfying.

Plus, this was a fun way to:

Practice rich layout skills.
Show off Python's capability to make beautiful CLI tools.
Track tasks in a fun, lightweight, visual way.

πŸ’¬ Let’s Connect
If you found this useful, drop a πŸ’– or leave a comment!
I'd love to see how you expand this into your own version.

Happy hacking! πŸ§‘β€πŸ’»πŸ’»

Top comments (2)

Collapse
 
alex-rivera88 profile image
Alex Rivera

This is so clean and well-organized! Love how you used rich and pyfiglet to make something so visually appealing in the terminal. Definitely bookmarking this β€” feels like a mini mission control for my system 😎

Collapse
 
nish2005karsh profile image
Nishkarsh Pandey

Thanks!!