https://roadmap.sh/projects/task-tracker
A command-line task management application built using Python. It allows users to create, update, delete, and track tasks directly from the terminal, with persistent storage using a JSON file.
- Add new tasks
- Update existing tasks
- Delete tasks
- Mark tasks as todo, in-progress, or done
- List all tasks
- Filter tasks by status
- Automatic ID generation
- Timestamp tracking (
createdAt,updatedAt) - No external libraries used
task-tracker/
├── task_cli.py
└── tasks.json (auto-created on first task)
- Python 3.x
- Standard library only (no external dependencies)
The application follows this flow:
CLI Input → Parse Command → Load JSON → Modify Data → Save JSON → Output
sys→ read command-line argumentsjson→ store and retrieve tasksos→ check file existencedatetime→ generate timestamps
Each task is stored as a dictionary inside a list:
{
"id": 1,
"description": "Study Python",
"status": "todo",
"createdAt": "2026-04-22T19:00:00",
"updatedAt": "2026-04-22T19:00:00"
}Run commands using:
python task_cli.py <command> [arguments]
python task_cli.py add "Task description"
Example:
python task_cli.py add "Study Python"
python task_cli.py list
python task_cli.py list done
python task_cli.py list todo
python task_cli.py list in-progress
python task_cli.py update <id> "New description"
Example:
python task_cli.py update 1 "Study Python deeply"
python task_cli.py delete <id>
Example:
python task_cli.py delete 1
python task_cli.py mark-in-progress <id>
python task_cli.py mark-done <id>
| Function | Purpose |
|---|---|
load_tasks() |
Reads tasks from JSON file |
save_tasks(tasks) |
Writes tasks to JSON file |
add_task(description) |
Adds a new task |
list_tasks(filter_status) |
Displays tasks (optionally filtered) |
update_task(id, description) |
Updates task description |
delete_task(id) |
Deletes a task |
update_status(id, status) |
Changes task status |
find_task(tasks, id) |
Finds a task by ID |
- Handles missing JSON file safely
- Prevents crashes on invalid inputs
- Checks for missing arguments
- Validates task existence before update/delete
- Task priorities (high/medium/low)
- Deadlines and reminders
- Sorting (by date or status)
- Export tasks to CSV
- GUI version
This project demonstrates:
- CLI-based application design
- File handling in Python
- JSON data manipulation
- Program structuring and modular functions
- Error handling and input validation
Arkapravo Roy