Task Tracker CLI project from roadmap.sh https://roadmap.sh/projects/task-tracker
A simple command-line task manager written in Python.
- Add tasks with descriptions.
- Update existing task descriptions.
- Delete tasks by ID.
- Mark tasks as "todo", "in-progress", or "done".
- List all tasks or filter by status.
- Tasks are saved in a JSON file for persistence.
-
Add a task:
python task_cli.py add "Finish project report" -
Update a task:
python task_cli.py update <task_id> "Updated task description"
-
Delete a task:
python task_cli.py delete <task_id>
-
Mark a task as done:
python task_cli.py mark <task_id> done
-
List all tasks:
python task_cli.py list
-
List tasks with a specific status:
python task_cli.py list in-progress
Task Statuses
todo: The task is yet to be started.
in-progress: The task is currently being worked on.
done: The task has been completed.
Data Storage
Tasks are stored in a JSON file named tasks.json in the same directory as the script.
Example
# Add some tasks
python task_cli.py add "Write unit tests"
python task_cli.py add "Deploy to staging"
# List all tasks
python task_cli.py list
# Mark a task as in-progress
python task_cli.py mark <task_id> in-progress
# Update a task description
python task_cli.py update <task_id> "Deploy to production"
# Delete a task
python task_cli.py delete <task_id>
# List completed tasks
python task_cli.py list doneAdditional Notes: The script uses uuid to generate unique IDs for tasks. Timestamps for task creation and updates are recorded in ISO format.