Set up essential CLI tools on a remote machine. Detects the platform and installs zellij, mosh, and fzf using the appropriate method.
Run this skill on a freshly provisioned remote server to bootstrap the interactive environment.
First, detect the platform:
OS="$(uname -s)"
if [ -f /etc/os-release ]; then
. /etc/os-release
DISTRO="$ID"
else
DISTRO="unknown"
fi
echo "OS=$OS DISTRO=$DISTRO"Then install each tool below according to the detected platform. Each section checks whether the tool is already installed and skips installation if so.
A terminal workspace (multiplexer).
command -v zellij && zellij --versionIf zellij is already installed, skip to the next tool.
brew install zellijThis works on any Linux distribution without needing a package manager entry:
ZELLIJ_VERSION=$(curl -s https://api.github.com/repos/zellij-org/zellij/releases/latest | grep '"tag_name"' | sed 's/.*"v\(.*\)".*/\1/')
curl -fsSL "https://github.com/zellij-org/zellij/releases/latest/download/zellij-x86_64-unknown-linux-musl.tar.gz" -o /tmp/zellij.tar.gz
tar -xzf /tmp/zellij.tar.gz -C /tmp
sudo install /tmp/zellij /usr/local/bin/zellij
rm /tmp/zellij.tar.gz /tmp/zellijFor aarch64 machines, replace the download URL with:
https://github.com/zellij-org/zellij/releases/latest/download/zellij-aarch64-unknown-linux-musl.tar.gz
If Rust is available:
cargo install --locked zellijzellij --versionMobile shell — a replacement for interactive SSH terminals.
command -v mosh && mosh --versionIf mosh is already installed, skip to the next tool.
brew install moshsudo apt-get update && sudo apt-get install -y moshsudo dnf install -y moshsudo pacman -S --noconfirm moshsudo apk add moshsudo zypper install -y moshsudo apt-get install -y build-essential protobuf-compiler libprotobuf-dev libutempter-dev libncurses5-dev zlib1g-dev libssl-dev pkg-config autoconf automake # Debian/Ubuntu deps
git clone https://github.com/mobile-shell/mosh /tmp/mosh-src
cd /tmp/mosh-src
./autogen.sh
./configure
make
sudo make install
cd - && rm -rf /tmp/mosh-srcmosh --versionA general-purpose command-line fuzzy finder. Install from GitHub directly.
command -v fzf && fzf --versionIf fzf is already installed, skip this section. If you want to update an existing install, see Update below.
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install --allThe --all flag enables key bindings and fuzzy completion without interactive prompts. The install script adds the necessary lines to your shell configuration (~/.bashrc or ~/.zshrc) to set up $PATH and shell integration.
cd ~/.fzf && git pull && ./install --allfzf --version| Tool | macOS | Ubuntu/Debian | Fedora | Arch | Other Linux |
|---|---|---|---|---|---|
| zellij | brew install |
binary from GitHub releases | binary from GitHub releases | binary from GitHub releases | binary from GitHub releases |
| mosh | brew install |
apt-get install |
dnf install |
pacman -S |
build from source |
| fzf | git clone | git clone | git clone | git clone | git clone |