- Simple CLI API
- Via single
todos.js
script - Database in
.json
. files - Outputs current state after every command
Use add {text}
command.
$ node todo.js add "Buy more juice"
$ node todo.js add "Go for a walk with the ferret"
$ node todo.js add "Time to finish the picture"
Run without arguments. Logs the list of unarchived tasks.
$ node todo.js
[ ] 1. Buy more juice
[ ] 2. Go for a walk with the ferret
[ ] 3. Time to finish picture
Use done {id}
command.
$ node todo.js done 1
[X] 1. Buy more juice
[ ] 2. Go for a walk with the ferret
[ ] 3. Time to finish picture
Use undone {id}
command.
$ node todo.js undone 1
[ ] 1. Buy more juice
[ ] 2. Go for a walk with the ferret
[ ] 3. Time to finish picture
Use delete {id}
command.
$ node todo.js delete 1
[ ] 2. Go for a walk with the ferret
[ ] 3. Time to finish picture
User archive
command. Archived tasks are possible to view only in database file.
$ node todo.js archive
[ ] 1. Go for a walk with the ferret
[ ] 2. Time to finish picture
[#] 3. Buy more juice
[
{
"text": "Go for a walk with the ferret",
"done": false
},
{
"text": "Time to finish picture",
"done": true
},
{
"text": "Buy more juice",
"done": false
}
]