Simple node.js todocli
$ npm install -g todocli
$ todocli COMMAND
running command...
$ todocli (-v|--version|version)
todocli/0.0.1 win32-x64 node-v10.15.0
$ todocli --help [COMMAND]
USAGE
$ todocli COMMAND
...
Adds a new todo
USAGE
$ todocli add
OPTIONS
-n, --task=task task
DESCRIPTION
...
Adds a new todo to the existing list
See code: src\commands\add.js
display help for todocli
USAGE
$ todocli help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help
Describe the command here
USAGE
$ todocli remove
OPTIONS
-n, --name=name name to print
DESCRIPTION
...
Extra documentation goes here
See code: src\commands\remove.js
Shows existing tasks
USAGE
$ todocli show
DESCRIPTION
...
Shows all the tasks sorted by their ids
See code: src\commands\show.js
Marks a task as done
USAGE
$ todocli update
OPTIONS
-n, --id=id task id
DESCRIPTION
...
Marks a task as done
See code: src\commands\update.js
Several of the commands, like add, update, and remove require a name or id parameter (or flag). There is support in oclif for defining required flags, but when defined as such via .flags, the resulting error message apears to be directed to stderr instead of stdout, and I was unable to get the mocha tests to verify stderr output. For this reason, required params are currently validated during the Command.run function. This is an area that could be improved.
The mocha unit tests are not complete. They cover all code branches, but depend on todo database state. These need to be refined so they are more robust and can execute even when no tasks have been defined.