A command-line tool to manage your to-do list. This tool allows you to add, list, toggle, and remove todos from your to-do list directly from the terminal.
- Add new todos
- List all todos
- Toggle the status of todos (mark as done/undone)
- Remove todos
-
Clone the repository:
git clone https://github.com/hyundonmoon/todo-cli.git cd todo-cli
-
Install dependencies:
npm install
-
Build app:
npm run build
-
Link the package locally:
npm run todo-link
This script will:
- Unlink the package if it was linked before.
- Set the dist/index.js file as executable.
- Link the package again.
Once the package is linked, you can use the todo
command from anywhere in your terminal.
To add a new todo, use the add
command followed by its description:
todo add "Learn Node.js"
To list all todos, use the list
or ls
command:
todo list
todo ls
To toggle the status of one or more todos (mark as done/undone), use the toggle
command:
todo toggle
You will be prompted to select todos to toggle their status.
To remove one or more todos, use the remove
or rm
command:
todo remove
todo rm
You will be prompted to select todos to remove.
$ todo add "Write README"
Added new todo: Write README
$ todo list
1. [ ] Write README
2. [ ] Learn Node.js
$ todo toggle
? Which todo item status would you like to toggle?
◯ [ ] Write README
◯ [ ] Learn Node.js
Toggled the statuses of the following items:
$ todo remove
? Which todo item would you like to delete?
◯ [ ] Write README
◯ [ ] Learn Node.js
$ todo mark-done
? Which todo item would you like to mark as done?
◯ [ ] Write README
◯ [ ] Learn Node.js
Marked the following items as done:
$ todo remove-done
Removed all todo items marked as done.