Skip to content

raghavruia-dev/todo-cli

Repository files navigation

CLI based ToDo Program

A simple ToDo program which allows user to perform specific operations related to tasks i.e:

  • Add
  • Update
  • Delete
  • Mark as done
  • Mark as undone
  • Show all tasks

📸 Sneak Peek

To-Do List Screenshot


🤖 CLI Commands

1. Add Task

Syntax: add <task_description>  
node index.js add "Buy groceries"

2. Update Task

Syntax: update <task_sr_no> <updated_task_description>
node index.js update 2 "Exercise for 30mins"

3. Delete Task

Syntax: delete <task_sr_no>
node index.js delete 1

4. Mark Task as done

Syntax: done <task_sr_no>
node index.js done 3

5. Mark Task as undone

Syntax: undone <task_sr_no> 
node index.js undone 3

6. Show all tasks

Syntax: show
node index.js show

🛠️ Installation

Follow these steps to set up the To-Do CLI application on your local machine.

Prerequisites

Before installing and running this project, make sure you have the following installed on your system:

  • Node.js (v14 or above recommended)
  • npm (comes bundled with Node.js)

1. Clone the Repository

git clone https://github.com/raghavruia-dev/todo-cli.git
cd todo-cli

2. Install Dependencies

npm install

This will install all required packages listed in package.json, with the package version as specified in package-lock.json.

3. Run the program

node index.js add "Buy groceries"

Refer to the CLI Commands section for all available operations.

After installation you can run the commands as specified above or even use the below command to understand the commands better

node index.js help

📟 Tech Stack & Libraries

  • Built on JavaScript with node.js as runtime environment
  • Commander.js to build CLI Interface

🐛 TODO (Future enhancements)

  • Improve error handling, by creation of JSON file if not present.
  • Improve readability by implementing async await function logic.
  • Implementing delete all tasks command with an option to retrieve recently deleted tasks by maintaining a backup.

About

A simple ToDo program which allows user to perform specific operations related to their tasks.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published