Task Tracker CLI is a simple command-line application for tracking and managing your tasks. It allows you to add, update, delete and list tasks with statuses such as "todo", "in-progress" and "done". Tasks are stored in a JSON file named tasks.json in the current directory. This is a solution for the Task Tracker challenge from Roadmap.sh.
If you wish to clone the repository, run:
git clone https://github.com/techgirldiaries/task-tracker-cli.git
cd task-tracker-cliEnsure you have Python 3 installed (tested with Python 3.6+)
Alternatively, you can save the code directly to a file named task-cli.py.
- 
Save the code to a file named task-cli.py.
- 
For Unix-like systems (Linux, macOS): - 
Make the script executable: chmod +x task-cli.py 
- 
Run the script directly: ./task-cli.py [command] [arguments] 
- 
Or run it with Python: python task-cli.py [command] [arguments] 
 
- 
- 
For Windows: - 
Run the script using Python: python task-cli.py [command] [arguments] 
- 
Or, if .pyfiles are associated with Python:task-cli.py [command] [arguments] 
 
- 
- 
Add a new task (with optional priority, due date, and notes): python task-cli.py add "Buy groceries" python task-cli.py add "Finish project report" 
- 
Update a task (update description, priority, due date, or notes): python task-cli.py update 1 "Buy groceries and vegetables"
- 
Delete a task: python task-cli.py delete 1 
- 
Mark a task as in progress or done: python task-cli.py mark-in-progress 2 python task-cli.py mark-done 1 
- 
List all tasks: python task-cli.py list - List all tasks by status:
 python task-cli.py list todo python task-cli.py list in-progress python task-cli.py list done
- File Storage: Uses a JSON file (tasks.json) to store tasks.
- Task Management:
- Add new tasks with descriptions.
- Update task descriptions.
- Delete tasks.
- Mark tasks as "todo", "in-progress" or "done".
 
- Task Listing:
- List all tasks with full details.
- Filter tasks by status ("todo", "in-progress", "done").
 
- Task Properties:
- Unique ID.
- Description.
- Status ("todo", "in-progress", "done").
- Creation timestamp.
- Last update timestamp.
 
- Error Handling:
- Invalid commands.
- Missing or invalid arguments.
- Invalid task IDs.
- File operation errors.
 
- 
Uses Python's built-in jsonmodule for file operations.
- 
No external dependencies required. 
- 
Simple command-line interface with positional arguments. 
- 
Comprehensive error handling for commands, arguments and file operations. 
- 
Maintains all required task properties. 
- 
Automatically creates the tasks.jsonfile if it doesn't exist.
Additional features such as setting task priorities, due dates and notes, as well as sorting and clearing tasks.