Inspired by roadmap.sh's Task Tracker project.
This is a simple command-line interface (CLI) tool for managing tasks. The tasks are stored in a task.json file in the current directory. Each task has an ID, description, status, created date, and updated date.
- Add Task: Add a new task with a description.
- Update Task: Update the description of an existing task by ID.
- Delete Task: Delete a task by its ID.
- Mark Task as In-Progress: Mark a task as "in-progress" by its ID.
- Mark Task as Completed: Mark a task as "completed" by its ID.
- List Tasks: List all tasks, or filter tasks by status (
toDo,in-progress,completed).
Each task includes the following properties:
id: A unique identifier.description: A short description of the task.status: The task's current status (toDo,in-progress,completed).createdAt: The date and time the task was created.updatedAt: The date and time the task was last updated.
Ensure Node.js is installed on your system.
- Clone or download this project.
- Place
task_tracker.jsin your project directory. - Run the commands using Node.js.
The CLI accepts the following commands:
node task_tracker.js add "task description"
node task_tracker.js update "new task description"
node task_tracker.js delete
node task_tracker.js mark-in-progress
node task_tracker.js mark-completed Example: node task_tracker.js mark-completed 2
node task_tracker.js list
node task_tracker.js list