Xxh
🚀 Bring your favorite shell wherever you go through the ssh. Xonsh shell, fish, zsh, osquery and so on.
Install / Use
/learn @xxh/XxhREADME
<a href='https://github.com/xxh/xxh#installation-methods'><img alt='[xxh demo]' src='https://raw.githubusercontent.com/xxh/static/master/xxh-demo2.gif'></a>
<table border="0" width="100%"> <col style="width:33%"> <col style="width:33%"> <col style="width:33%"> <tbody> <tr style="border: 0px !important;"> <td valign="top" style="border: 0px !important;"><b>Portable</b>. Preparing portable shells and plugins occurs locally, and then xxh uploads the result to the host. No installations or root access on the host required. Security and host environment are a prime focus.</td> <td valign="top" style="border: 0px !important;"><b>Hermetic</b>. Deleting the <code>~/.xxh</code> directory from the remote host will make the remote environment function as if xxh was never there. By default your home is the <code>.xxh</code> directory and you can <a href="https://github.com/xxh/xxh/wiki#how-to-set-homeuser-as-home-on-host">choose the hermetic level of your xxh session</a>.</td> <td valign="top" style="border: 0px !important;"><b>Careful</b>. No blindfolded copying config files from local to remote host. Following privacy and repeatability practices, the best way is to fork the xxh plugin or shell example and pack your configs into it. </td> </tr> <tr style="border: 0px !important;"> <td valign="top" style="border: 0px !important;"><b>Be open and fork-ready</b>. Every xxh repo could be forked, customized, and reused without waiting for a package management system, xxh release, or any third party packages. Five shells are currently supported and more could be added by the community.</td> <td valign="top" style="border: 0px !important;"><b>Do more</b>. The xxh packages are not only about shells. Any type of tool or code could be behind an entrypoint. If you want to run <a href="https://github.com/browsh-org/browsh">browsh</a> or <a href="https://github.com/juftin/browsr">browsr</a> on the remote host, just put its portable version as an entrypoint in the xxh-shell.</td> <td valign="top" style="border: 0px !important;"><b>Chameleon</b>. Switching shells is as easy as possible and you don't have to be locked in to one shell. Choose your current shell based on the task you want to solve: <code>xxh anyhost +s xonsh</code> for a Python environment, osquery for simple querying, fish for modern features or time-tested zsh and bash for speed. </td> </tr> </tbody> </table>Installation methods
PyPi 3
pip install xxh-xxh
# OR from repo: pip install git+https://github.com/xxh/xxh
pipx - good alternative to brew and pip, read comparison
pipx install xxh-xxh
xonsh shell
xpip install xxh-xxh
Conda-forge feedstock
conda config --add channels conda-forge
conda install xxh-xxh
Homebrew
brew install xxh
Macports
sudo port install xxh
Linux portable binary
mkdir ~/xxh && cd ~/xxh
wget https://github.com/xxh/xxh/releases/download/0.8.12/xxh-portable-musl-alpine-Linux-x86_64.tar.gz
tar -xzf xxh-portable-musl-alpine-Linux-x86_64.tar.gz
./xxh
Linux AppImage
mkdir ~/xxh && cd ~/xxh
wget -O xxh https://github.com/xxh/xxh/releases/download/0.8.12/xxh-x86_64.AppImage
chmod +x xxh && ./xxh
To run AppImage on Alpine Linux install alpine-pkg-glibc with localedef.
Shells
Currently supported OS for the target host is Linux on x86_64. ARM support from the community.
| xxh-shell | status | xxh-plugins | seamless | demo |
|-----------------------------------------------------------------------|------------|-------------|---------|------|
| xonsh | stable | autojump, [+] | xxh.xsh | <a href="https://asciinema.org/a/osSEzqnmH9pMYEZibNe2K7ZL7" target="_blank">demo</a> |
| zsh | stable | ohmyzsh, p10k, [+] | xxh.zsh | <a href="https://asciinema.org/a/rCiT9hXQ5IdwqOwg6rifyFZzb" target="_blank">demo</a> |
| fish | stable | ohmyfish, fisher, userconfig, [+] | todo |
| bash | stable | ohmybash, [+] | xxh.bash | <a href="https://asciinema.org/a/314508" target="_blank">demo</a> |
| osquery | beta | | | |
| fish-appimage | alpha | | | |
| elvish | alpha | | | |
Search xxh shell on Github or Bitbucket or create your shell entrypoint to use another portable shell.
Prerun plugins
Prerun plugins allow you to bring any portable tools, dotfiles, or aliases to your xxh session before running the shell.
Pinned plugins: core (xxh-sudo, xxh-screen, xxh-tmux), dotfiles, docker, python, xxh, vim, zoxide, starship. There is cookiecutter template to create a prerun plugin.
Usage
Use xxh instead of ssh when connecting to Linux hosts without changing ssh arguments:
xxh <host from ~/.ssh/config>
xxh [ssh arguments] [user@]host[:port] [xxh arguments]
xxh local [xxh arguments]
Common examples (use xxh --help to get info about arguments):
xxh anyhost # Connect to the host
xxh -i id_rsa -p 2222 anyhost # Using ssh arguments: port and key
xxh user@host +c et # Using EternalTerminal (https://github.com/MisterTea/EternalTerminal)
xxh anyhost +s zsh +i # Set the shell and install it without yes/no question
xxh anyhost +s xonsh +hhh "~" # Set /home/user as home directory (read Q&A)
xxh anyhost +s bash +I xxh-plugin-bash-vim # Preinstall a plugin
xxh anyhost +if +q # Force reinstall xxh on the host in quiet mode
xxh anyhost +hh /tmp/xxh +hhr # Upload xxh to /tmp/xxh and remove when disconnecting
source xxh.zsh anyhost +I xxh-plugin-zsh-ohmyzsh # Connect in seamless mode with ohmyzsh plugin
xxh local +s xonsh # Experimental: build xxh environment inplace and without ssh
For reusing arguments and simplifying xxh usage (like shortening to xxh anyhost), there is a config file.
Why the plus sign for the xxh arguments? The xxh is using the plus sign for xxh arguments to preserve the ability to use the minus sign for the original ssh arguments. This allows just replacing the first two letters in the ssh command to convert it to the xxh command. Also see the discussion.
Installing xxh packages
xxh [+I xxh-package +I ...] [+L] [+RI xxh-package +RI ...] [+R xxh-package +R ...]
Different ways to set the xxh package source:
xxh +I xxh-shell-example # install from https://github.com/xxh
xxh +I https://github.com/xxh/xxh-shell-example # short url for github only, for other sources use examples below or add support
xxh +I https://github.com/xxh/xxh-shell-example/tree/mybranch # short url for github only, for other sources use examples below or add support
xxh +I xxh-shell-example+
Related Skills
tmux
341.8kRemote-control tmux sessions for interactive CLIs by sending keystrokes and scraping pane output.
blogwatcher
341.8kMonitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.
product
Cloud-agnostic Kubernetes infrastructure with Terraform & Helm for homelabs, edge, and production clusters.
Unla
2.1k🧩 MCP Gateway - A lightweight gateway service that instantly transforms existing MCP Servers and APIs into MCP servers with zero code changes. Features Docker deployment and management UI, requiring no infrastructure modifications.
