Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

duplicate

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/stderr via pipes. It is just for MVP phase at this stage. Fully interactive TUI apps (vim, htop) require PTY support and may be added later.


Installation

With Cargo (cross-platform)

cargo install duplicate-cli

With pre-built binaries (cross-platform)

curl -fsSL https://raw.githubusercontent.com/BitrixStudio/duplicate/master/install.sh | bash

With PowerShell (Windows)

irm https://raw.githubusercontent.com/BitrixStudio/duplicate/master/install.ps1 | iex

Usage

duplicate [OPTIONS] <CMD> [ARGS]...

-n, --n number of panes/instances (default: 2)

Instance arguments can be provided in two ways:

Shorthand mode

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 target

runs:

cmd /C dir .
cmd /C dir src
cmd /C dir target

Grouped mode

If ::: 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.org
⚠️ This functionality is still experimental and may not work as expected on all operating systems.

More examples

Windows:

duplicate cmd /C dir . src
duplicate -n 4 cmd /C ping 127.0.0.1 localhost 8.8.8.8 1.1.1.1
duplicate -n 3 cmd /C dir . src target

Linux/macOS:

duplicate ls -lha /etc /var
duplicate -n 3 ls -lha /etc /var /tmp
duplicate -n 2 curl -sS ::: https://example.com ::: https://example.org

License

MIT License (https://opensource.org/licenses/MIT)

About

wrapper for running multiple sessions in one terminal tab

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages