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
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)
Output:
π 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)