Welcome to the Task Management CLI Application!
- Add new tasks.
- Update existing tasks.
- Delete tasks.
- Mark tasks as In Progress or Done.
- List all tasks or filter tasks by status (To Do, In Progress, Done).
- Node.js (version 14 or higher)
Follow these steps to get started with the application:
-
Clone the Repository
git clone https://github.com/Gaurav-Hero/CLI-TASK-MGMT.git cd task-mgmt-cli
-
Install Dependencies
npm install
Run the app using the following command structure:
node app.js <command> <arg1> <arg2> ...
Command | Description | Example |
---|---|---|
add <description> |
Adds a new task with the given description. | node app.js add "Buy groceries" |
update <id> <desc> |
Updates the task with the specified ID and new description. | node app.js update 1 "Buy groceries and cook dinner" |
delete <id> |
Deletes the task with the specified ID. | node app.js delete 1 |
mark-in-progress <id> |
Marks the task with the specified ID as In Progress. | node app.js mark-in-progress 1 |
mark-done <id> |
Marks the task with the specified ID as Done. | node app.js mark-done 1 |
list |
Lists all tasks. | node app.js list |
list <status> |
Lists tasks filtered by status (todo, in-progress, done). | node app.js list done |
Each task has the following properties:
Property | Description |
---|---|
id | A unique identifier for the task. |
description | The task description provided by the user. |
status | The current status (todo, in-progress, or done). |
createdAt | The date and time when the task was created. |
updatedAt | The date and time when the task was last updated. |
-
Add a new task:
node app.js add "Learn Node.js"
Output:
Task added successfully (ID: 1)
-
Mark the task as In Progress:
node app.js mark-in-progress 1
Output:
Task marked as in-progress (ID: 1)
-
List all tasks:
node app.js list
Output:
[in-progress] ID: 1, Description: Learn Node.js
-
Update the task description:
node app.js update 1 "Learn Node.js and Build a CLI App"
Output:
Task updated successfully (ID: 1)
-
Mark the task as Done:
node app.js mark-done 1
Output:
Task marked as done (ID: 1)
-
Delete the task:
node app.js delete 1
Output:
Task deleted successfully (ID: 1)
The application gracefully handles the following errors:
- Task not found (invalid ID).
- Missing required arguments.
- Invalid command usage.
Learn More ✨ Check out the Official Task Tracker Roadmap for detailed insights and guidance on building this project!
Contributions are welcome! Feel free to fork the repository and submit a pull request.
This project is licensed under the MIT License.