#pty #vte #tty #terminal #emulator

terminal-emulator

A helper library for building terminal emulators, broken out from alacritty and inspired by libvte

1 unstable release

0.1.0 Feb 26, 2019

#15 in #vte

MIT license

220KB
5K SLoC

mux

Like tmux but without the t

mux is a terminal command multiplexer. It tries to be compatible with xargs; it accepts the same flags and syntax.

The big difference is that mux runs all commands in parallel, in separate pseudo-terminals. As such, it can be used to replace tools such as cluster-ssh and tmux for the use-case where you want to run lots of commands in parallel and give them the same input.

mux was written for my personal use in my free time, and as such there is not a super huge focus on code quality or testing. The tool is pragmatic and tries to cover common use-cases.

screenshot

Installation

Install Rust, then:

$ rustup toolchain add nightly-2019-03-11
$ cargo +nightly-2019-03-11 install --git https://github.com/dflemstr/mux.git

Make sure that ~/.cargo/bin is in your PATH (rustup usually sets this up automatically).

Simple usage

Running echo '1 2 3' | mux command arg1 arg2 will start command arg1 arg2 1, command arg1 arg2 2 and command arg1 arg2 3 in parallel.

You use Ctrl+T to exit the GUI that pops up.

See mux --help for more info.

Examples

$ cat hosts.txt
m1.example.com
m2.example.com
m3.example.com
m4.example.com
# Starts the 'uptime' command using 'ssh' on all hosts in parallel.
$ mux ssh '{}' uptime < hosts.txt

Dependencies

~2MB
~34K SLoC