🎯 Build a Terminal Task Manager in Python with pyfiglet and rich!!!
Nishkarsh Pandey

Nishkarsh Pandey @nish2005karsh

About: Full-stack learner | Streamlit developer 🚀 Turning ideas into projects and projects into lessons. Always building. Always sharing.

Location:
Delhi,India
Joined:
Dec 11, 2024

🎯 Build a Terminal Task Manager in Python with pyfiglet and rich!!!

Publish Date: May 24
25 16

Spice up your command-line apps with beautiful visuals and interactivity!

🚀 What You’ll Build
A fully functional task manager you can run in your terminal — complete with:

✅ Add/delete tasks
✅ Mark tasks as complete
✅ Colorful ASCII headers
✅ Richly styled tables
✅ Interactive CLI menus

All using Python and a couple of lesser-known but super cool libraries!

🧰 What You’ll Need
Install these first:

pip install pyfiglet rich

Enter fullscreen mode Exit fullscreen mode

💡 Why This Is Fun
CLI apps often feel dry — but throw in some ASCII art and beautiful tables, and suddenly you’ll want to open your terminal. I use these techniques to stay motivated during long automation or data scraping runs — it adds a bit of flair!

🧑‍💻 The Code: task_manager.py

import pyfiglet
from rich.console import Console
from rich.table import Table
from rich.prompt import Prompt
import sys

console = Console()
tasks = []

def show_banner():
    ascii_banner = pyfiglet.figlet_format("Task Manager")
    console.print(f"[bold cyan]{ascii_banner}[/bold cyan]")

def show_menu():
    console.print("\n[bold yellow]Options:[/bold yellow]")
    console.print("[1] View Tasks")
    console.print("[2] Add Task")
    console.print("[3] Complete Task")
    console.print("[4] Delete Task")
    console.print("[5] Exit")

def display_tasks():
    if not tasks:
        console.print("[italic]No tasks available.[/italic]")
        return
    table = Table(title="📋 Your Tasks", show_lines=True)
    table.add_column("ID", style="dim")
    table.add_column("Task", style="cyan")
    table.add_column("Status", style="green")

    for idx, task in enumerate(tasks):
        table.add_row(str(idx), task["name"], task["status"])

    console.print(table)

def add_task():
    name = Prompt.ask("Enter task name")
    tasks.append({"name": name, "status": "Pending"})
    console.print("[green]Task added![/green]")

def complete_task():
    display_tasks()
    index = Prompt.ask("Enter task ID to complete")
    try:
        tasks[int(index)]["status"] = "✅ Completed"
        console.print("[green]Task marked as completed![/green]")
    except (IndexError, ValueError):
        console.print("[red]Invalid task ID![/red]")

def delete_task():
    display_tasks()
    index = Prompt.ask("Enter task ID to delete")
    try:
        deleted = tasks.pop(int(index))
        console.print(f"[red]Deleted:[/red] {deleted['name']}")
    except (IndexError, ValueError):
        console.print("[red]Invalid task ID![/red]")

def main():
    show_banner()
    while True:
        show_menu()
        choice = Prompt.ask("Choose an option", choices=["1", "2", "3", "4", "5"])
        if choice == "1":
            display_tasks()
        elif choice == "2":
            add_task()
        elif choice == "3":
            complete_task()
        elif choice == "4":
            delete_task()
        elif choice == "5":
            console.print("[bold cyan]Goodbye! 👋[/bold cyan]")
            sys.exit()

if __name__ == "__main__":
    main()

Enter fullscreen mode Exit fullscreen mode

Output

Terminal1

Terminal2

🎉 Wrap-Up

This is a great base for building more advanced terminal tools — think:

Save/load from JSON or a file.
Add due dates, priorities, tags.
Sort/filter/search tasks.
Keyboard shortcuts.

If you enjoyed this, try exploring more rich features like progress bars, panels, and live dashboards!

💬 Over to You!
Have you built any cool terminal tools using Python? Got tips for making CLIs more interactive and fun? Drop a comment!

Comments 16 total

  • Madhurima Rawat
    Madhurima RawatMay 24, 2025

    This looks so beautiful!

    • Nishkarsh Pandey
      Nishkarsh PandeyMay 24, 2025

      Thank you so much, Madhurima! 😊
      I'm really glad you liked it — making the terminal visually fun definitely boosts motivation during long sessions. I’m working on expanding this into a full-featured CLI dashboard next — stay tuned! 💻🌟

  • Dotallio
    DotallioMay 24, 2025

    Love how the banner and table styling instantly make this way more inviting - I always add a dash of color to my own CLI scripts too! Have you tried adding keyboard shortcuts for even faster task management?

    • Nishkarsh Pandey
      Nishkarsh PandeyMay 24, 2025

      Thank you so much! I totally agree—color really livens up the CLI experience.
      Adding keyboard shortcuts is a fantastic idea! It would definitely speed up task management and make the tool even more user-friendly. I’m planning to explore that next, maybe with libraries like keyboard or readchar for capturing key inputs.
      Would love to hear if you have any favorite shortcuts or tips!

  • Nathan Tarbert
    Nathan TarbertMay 24, 2025

    Pretty cool, I love spicing up boring terminal stuff - the colors just make me wanna use it more honestly.

    • Nishkarsh Pandey
      Nishkarsh PandeyMay 24, 2025

      Thanks!! I totally agree -- colors really make the terminal more fun and engaging!

  • nadeem zia
    nadeem ziaMay 24, 2025

    Wow, amazing work

  • Aida Said
    Aida SaidMay 24, 2025

    Looks amazing

  • Saint Thomas Brown ♟
    Saint Thomas Brown ♟May 24, 2025

    Great read, absolutely will be saving this for this books.

    • Nishkarsh Pandey
      Nishkarsh PandeyMay 25, 2025

      Thanks a ton! 🙌 Glad you found it useful. Hope it earns a cozy spot between your favorite bookmarks (or books 😉). Let me know if you ever tweak it or build on it!

  • Jane Marcus
    Jane MarcusMay 28, 2025

    THE BLACK MIRROR IS POWERFUL. Who could believe that I would be rich someday? but Baba Powers made it possible with the black mirror which I purchased from him. Thanks to him because the black mirror reveals the secrets, unlock the power. I came across various testimonials which state how the black mirror has been of good and great help to them. I also contacted Baba Powers on his email; Babablackmirrors@gmail.com   to also experience it for myself. I am really happy to get the black mirror. Thank you Baba Powers for your special black mirror. You can also view his website and you will see amazing testimonies from people that he has helped. His website is; Babablackmirrorsofpowers.blogspot.com  I urge you now to contact him and you will never regret it. 

    • Tsutomu Shimomurahacker
      Tsutomu ShimomurahackerSep 17, 2025

      FINALLY I GOT MY LOST BITCOIN BACK ALL THANKS TO TSUTOMU SHIMOMURA

      Hello everyone I want to use this Medium to say big thank you to TSUTOMU SHIMOMURA for they helped me recover my stolen crypto worth $250,000 through their hacking skills I tried it I was skeptic but it worked and I got my money back, I’m so glad I came across them early because I thought I was never going to get my money back from those fake online investment websites . you can also contact them WEBSITE: tsutomushackexpert.com/ or Email address support@tsutomushackexpert.com, and I’m sure you will be happy you did. ****

    • Justin Simporios
      Justin SimporiosSep 25, 2025

      Good Morning! My name is Justin Simporios from Canada. My daughter was unable to walk for several months after an accident that required her to have surgery. Because I haven't won the Lotto I've been playing for so long, I haven't been able to pay for the surgery. A friend online recommended Lord Meduza to me and he deserves a really, really big THANK YOU. This man chose to help me with a lottery spell and he gave me the precise numbers to play the Canada Lotto Max Lottery. After two weeks, I was proclaimed the winner of $80 MILLION DOLLARS. Now, my daughter will be able to walk once more after so much time as her surgery is now completely funded. My victory marks the biggest win for a single ticket in Lotto Max history in Canada. I still can't believe it, Indeed there's none like Lord Meduza. Although if you want your EX LOVER back he can help you too so get in touch with him now via

      Email: lordmeduzatemple@hotmail.com
      Whats-App: +1 (807) 907-2687
      Website: lordmeduzatemple.com

  • Razi Haider Jaffery
    Razi Haider JafferyMay 28, 2025

    Saving this post for future. Thanks for sharing it!

Add comment