A simple command/job runner
Shell 54%
JavaScript 42%
Nix 4%

README.md

disag #

Run commands concurrently and mirror their output.

Usage #

./disag.js \
  'npm test' -n TEST -f ./test.log \
  'npm run lint' -n LINT -f ./lint.log

Options apply to the command immediately before them.

Options #

  • -n, --name <name>: prefix displayed lines with [name].
  • -f, --file <path>: write raw stdout/stderr to a log file.
  • -s, --shell: run the command with sh -c.
  • -r, --retry: retry until the command exits with code 0.
  • --sleep <duration>: wait before retrying, e.g. 250ms, 1s, or 0.
  • -z, --no-color: disable ANSI color.
  • -h, --help: show help.

Retry until success:

./disag.js 'flaky-command' -r --sleep 250ms -n FLAKY

Use shell syntax:

./disag.js 'echo out; echo err >&2' -s -n SHELL