A simple command-line todo list application built with Node.js.
- Node.js installed on your system
- Clone the repository
git clone https://github.com/0xlam/todo-cli.git
cd todo-cli- Run the application:
node app.js| Command | Description |
|---|---|
add <task text> |
Add a new task |
list |
Show all tasks |
done <id>[,id2,...] |
Mark one or more tasks as completed |
undo <id>[,id2,...] |
Mark one or more tasks as not completed |
remove <id>[,id2,...] |
Delete one or more tasks |
edit <id> <new text> |
Edit task text |
filter <done|pending> |
Filter tasks by completion status |
clear |
Delete all tasks |
stats |
Show task statistics |
help |
Show available commands |
exit |
Close the application |
todo> add Buy groceries
# Task added successfully: [1] Buy groceries
todo> add Walk the dog
# Task added successfully: [2] Walk the dog
todo> add Write report
# Task added successfully: [3] Write report
todo> list
# Your tasks:
# ---------------------------
# [1] [ ] Buy groceries
# [2] [ ] Walk the dog
# [3] [ ] Write report
# ---------------------------
todo> done 1,3
# Task marked as completed: [1] Buy groceries
# Task marked as completed: [3] Write report
todo> stats
# Total: 3 | Completed: 2 | Pending: 1
todo> exit
# Saving tasks...
# Saved 3 task(s) to tasks.json.
# Goodbye.
- Tasks are stored in a file
- Task IDs restart after
clear.
- Add a
searchcommand. - Improve output formatting for better readability.