This is a simple and user-friendly CLI-based ToDo application for developers, allowing you to manage your tasks directly from the terminal without ever leaving it. Built using Node.js, this tool helps you add, list, update, and delete tasks with ease.
https://x.com/rajveeerrsingh/status/1831341445015585029?s=46
- Add a Task: Add a new task with an optional due date.
- List Tasks: List all tasks, filter by completed, pending, or all tasks.
- Mark Complete: Mark a specific task as completed using its ID.
- Mark Incomplete: Revert a task marked as complete to pending status.
- Delete Task: Delete a task using its ID.
- View Details: View detailed information about a specific task.
- Update Task: Update the title, due date, or status of an existing task.
- Count Tasks: Display the count of all, completed, and pending tasks.
-
Clone the Repository:
git clone https://github.com/rajveeerr/100xDevs-Journey.git
-
Navigate to the CLI ToDo Directory:
cd 100xDevs-Journey/Assignments/Week4/Assignments/CLI-Todo
-
Install Dependencies: Make sure you have Node.js installed on your system. Install the necessary dependencies by running:
npm install
You can use the following commands to interact with the ToDo application:
todo add "Finish homework" --due 2024-09-15
- List all tasks:
todo list --all
- List only completed tasks:
todo list --completed
- List only pending tasks:
todo list --pending
todo complete <task_id>
todo incomplete <task_id>
todo delete <task_id>
todo details <task_id>
- Update task title:
todo update <task_id> --title "New Title"
- Update task due date:
todo update <task_id> --due "2024-09-20"
- Update task status:
todo update <task_id> --status completed|pending
todo count
To reduce the amount of code you type, you can set up an alias for the command. Add the following line to your .bashrc
, .zshrc
, or equivalent shell configuration file:
alias todo="node CLIBasedTodo.js"
Feel free to fork this repository, submit issues, or create pull requests to improve the application.
Happy coding!