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 π€)
π§° 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)
The Output:
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
π€ 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)
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 π
Thanks!!