Run N copies of the same command and view their outputs side-by-side in one terminal window.
Useful for:
- comparing outputs (e.g. two directories)
- running multiple environments in parallel
- watching multiple logs / pings side-by-side
Note: This version of the tool currently captures
stdout/stderrvia pipes. It is just for MVP phase at this stage. Fully interactive TUI apps (vim, htop) require PTY support and may be added later.
cargo install duplicate-clicurl -fsSL https://raw.githubusercontent.com/BitrixStudio/duplicate/master/install.sh | bashirm https://raw.githubusercontent.com/BitrixStudio/duplicate/master/install.ps1 | iexduplicate [OPTIONS] <CMD> [ARGS]...-n, --n number of panes/instances (default: 2)
Instance arguments can be provided in two ways:
If ::: is not present, the last N arguments are treated as per-instance arguments (one arg per instance).
duplicate -n 3 cmd /C dir . src targetruns:
cmd /C dir .
cmd /C dir src
cmd /C dir targetIf ::: is present, the arguments before ::: are treated as common arguments, and the arguments after ::: are N instance arguments.
duplicate -n 3 curl -sS ::: https://example.com ::: https://httpbin.org/get ::: https://example.orgWindows:
duplicate cmd /C dir . srcduplicate -n 4 cmd /C ping 127.0.0.1 localhost 8.8.8.8 1.1.1.1duplicate -n 3 cmd /C dir . src targetLinux/macOS:
duplicate ls -lha /etc /varduplicate -n 3 ls -lha /etc /var /tmpduplicate -n 2 curl -sS ::: https://example.com ::: https://example.orgMIT License (https://opensource.org/licenses/MIT)