master-todo-cli
v1.0.1
Published
A simple CLI for managing TODO tasks
Downloads
4
Readme
todo-cli
todo-cli
is a command-line interface (CLI) tool for managing your todo tasks. It allows you to add, list, mark as completed, remove, and update tasks stored in a todo.json
file.
NPM installation
npm install master-todo-cli
Installation
Clone the repository and navigate to the project directory:
git clone https://github.com/master-utsav/todo-cli.git
cd todo-cli
Install dependencies (if any):
npm install
Usage
Add a New Task
To add a new task to the todo list:
node todo.js add "Your task description"
List All Tasks
To list all tasks:
node todo.js ls
Mark a Task as Completed
To mark a specific task as completed:
node todo.js done <taskNumber>
Replace <taskNumber>
with the number of the task you want to mark as completed.
Remove a Task
To remove a specific task:
node todo.js rm <taskNumber>
Replace <taskNumber>
with the number of the task you want to remove.
Update a Task
To update a specific task:
node todo.js update <taskNumber> "Updated task description"
Replace <taskNumber>
with the number of the task you want to update and "Updated task description"
with the new task description.
Example
# Add tasks
node todo.js add "Buy groceries"
node todo.js add "Read a book"
# List tasks
node todo.js ls
# Mark the first task as completed
node todo.js done 1
# Update the second task
node todo.js update 2 "Read a novel"
# Remove the first task
node todo.js rm 1
# List tasks again to see the changes
node todo.js ls
License
This project is licensed under the MIT License.