Command-line task lists made pretty.
Gracefully handles and displays failures, including if a given command is not found. Supports local binaries from node_modules/.bin
without specifying npx
, and allows setting environment variables cross-platform.
If used in a CI environment, command output is outputted as is.
npm install --save-dev listr-cli
$ npx listr [title::]<command> […]
Commands should be space-separated. Commands with spaces in them must be surrounded by quotes.
Equivalent to command1 && command2 && …
.
Tasks can be prefixed with a custom name, in the form title::command
. Multi-word titles must be surrounded by quotes. By default, task titles use the first word of a command.
--hide-timer
Disable showing successful task durations. By default, durations are shown.
--no-persist
Disable persisting task output. By default, task outputs persist after completion.
--all-optional
(--opt
)Continue executing tasks if one fails. By default, the task list will cancel early.
--environment
(--env
, -e
)Set environment variables cross-platform via process.env
. Follows the same syntax as Rollup:
$ listr ava --env CI,NODE_OPTIONS:'--loader=tsx'
#=> process.env.CI = "true"
#=> process.env.NODE_OPTIONS = "--loader=tsx"