Flags and options

  -c, --container strings container(s) to look up (repeatable)
      --env              show environment variables for the process
  -x, --exact            use exact name matching (no substring search)
  -f, --file strings     file(s) held open by a process (repeatable)
  -h, --help             help for witr
  -i, --interactive      interactive mode (TUI)
      --json             show result as JSON
      --no-color         disable colorized output
  -p, --pid strings      pid(s) to look up (repeatable)
  -o, --port strings     port(s) to look up (repeatable)
  -s, --short            show only ancestry
  -t, --tree             show only ancestry as a tree
      --verbose          show extended process information
  -v, --version          version for witr
      --warnings         show only warnings

Target flags#

--pid, --port, --file and --container select what to look up. All four are repeatable, and all four can be mixed with each other and with positional name arguments in one command.

witr nginx --port 5432 --pid 1234 --container redis

Results appear sequentially, in the order you typed them, separated by labeled dividers. Every output mode works with multiple inputs.

Positional arguments#

Arguments without a flag are treated as process or service names. Multiple names can be passed.

Name matching uses substring search by default — witr ng matches both nginx and ngrok. Add --exact (-x) to match only an exact name.

witr nginx -x

Output modes#

Flag What you get
(none) Standard output: process, chain, source, context, warnings
--short The ancestry chain on one line
--tree Ancestry as a tree, including up to 10 children, target highlighted
--json Machine-readable output with meaningful exit codes
--env Environment variables for the process
--warnings Only the warnings
--verbose Extended process information, plus container mounts, networks and compose metadata
--no-color Plain text, for logs and pipes

What launches the TUI#

The interactive dashboard opens when you pass no arguments, when no target flag is present, or when you pass --interactive explicitly. Any target flag switches back to single-answer CLI mode.

Container matching#

--container searches Docker, Podman, nerdctl, Kubernetes and crictl, Incus, LXC, LXD and FreeBSD jails, and matches against container name, image, command, and compose project and service labels. Details in Query by Container.