A simple, fast, and functional command-line task manager built in C++. Tasks are stored with deadlines, priorities, and completion status using an AVL tree for efficient lookup and organization. Data persists between sessions using a local file.
Originally developed as a university project — but polished to be a usable real-world tool.
- ✅ Add tasks with a title, description, priority, and deadline
- 📅 Organize tasks by deadline with fast AVL-based access
- 📂 Persistent storage to a file (
tasks.db) - 🧹 Mark tasks as done or remove them
- 🔍 List tasks with filters (e.g., only for today or only done)
- ⚙️ Clean CLI interface with flexible commands (via
cxxopts)
g++ -std=c++17 main.cpp -o task_managerRequires C++17 and the
cxxopts.hppheader (already included).
Here are some example commands to get you started:
./task_manager add --title "Study for exam" --desc "Math and Physics" --priority 3 --deadline 2025-06-15./task_manager done --title "Study for exam"./task_manager remove --title "Study for exam"./task_manager list./task_manager list --today
./task_manager list --deadline 2025-06-15./task_manager list --done./task_manager --helpThe app is built around two main components:
Each task includes:
title(required)description(optional)priority(default: 5)deadline(format:YYYY-MM-DD, defaults to today)isCompleted(true/false)
All fields are serialized as a line like:
title|description|priority|deadline|status
An AVL tree stores tasks ordered by deadline. Each node contains a list of tasks for the same date. The tree:
- Balances itself on insert/delete
- Allows fast filtering by date
- Internally maps titles for fast access/removal
All tasks are saved in a local file: tasks.db.
It’s created automatically and updated after every command.
Want to reset your task list? Just delete the file.
main.cpp # CLI entry point + logic
include/cxxopts.hpp # CLI argument parser
include/utils.hpp # String + file helpers
tasks.db # Persistent task storageThis was a hands-on way to:
- Practice implementing AVL trees from scratch
- Work with classes, file I/O, and command-line arguments
MIT License — free to use, modify, and share.