Solution to task-tracker-cli from roapmap.sh
This is a simple command-line interface (CLI) task tracker developed in Node.js and TypeScript. The application allows users to manage their tasks directly from the terminal, including features such as adding tasks, updating task descriptions, marking tasks as in progress or done, listing tasks by status, and deleting tasks by ID.
- Add new tasks with descriptions.
- Update task descriptions by their ID.
- Mark tasks as "in-progress" or "done".
- List all tasks or filter them by status (
todo
,in-progress
, ordone
). - Delete tasks by their ID.
- Node.js (version 14.x or higher)
- TypeScript (version 4.x or higher)
Ensure that you have both Node.js and TypeScript installed before proceeding.
-
Clone the repository:
git clone https://github.com/Samuel581/task-tracker-cli.git
-
Natigate to the project directory:
cd tasl-tracker-cli
-
Install the project dependencies:
npm install
-
Ensure you are in the
src
directory for running commands:cd src
The CLI provides various commands for task management. Below are examples of how to use each feature:
To add a new task run the following command:
npx ts-node index.ts add 'Make dinner'
To update the description of a task by its ID:
npx ts-node index.ts update 1 "Buy groceries and cook dinner"
To delete a task by its ID:
npx ts-node index.ts delete 1
To mark a task as "in-progress":
npx ts-node index.ts in-progress 1
To mark a task as "done":
npx ts-node index.ts done 1
To list all tasks:
npx ts-node index.ts list
To list tasks filtered by status:
List all tasks marked as "done":
npx ts-node index.ts list done
List all tasks marked as "todo":
npx ts-node index.ts list todo
List all tasks marked as "in-progress":
npx ts-node index.ts list in-progress