<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>pip install xxh-xxh # OR from repo: pip install git+https://github.com/xxh/xxh
pipx install xxh-xxh
xpip install xxh-xxh
conda config --add channels conda-forge conda install xxh-xxh
brew install xxh
sudo port install xxh
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
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.
Currently supported OS for the target host is Linux on x86_64.
| 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 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.
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.
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+git+https://github.com/xxh/xxh-shell-example # long url for any git repo xxh +I xxh-shell-example+git+https://github.com/xxh/xxh-shell-example/tree/mybranch # github only branch support xxh +I xxh-shell-example+git+git@github.com:githubuser/xxh-shell-example.git # install from private repository using ssh xxh +I xxh-shell-example+path+/home/user/my-xxh-dev/xxh-shell-example # install from local path
This is experimental magic. Please read the text below twice.
If you have shell access on the host or you're in a docker container and you can't ssh to it
then you can download and build a hermetic xxh environment inplace. The xxh local command works
exactly like xxh remote_host and creates a hermetic environment in ~/.xxh by default.
At this time we don't have portable build tools like git, wget, curl, tar and others which
could be required by some xxh package build scripts. When running xxh local it is expected that the tools are present on the host.
To run xxh inplace on Linux x86_64 just copy and paste these bash commands:
XH=~/.xxh \ && XD=https://github.com/xxh/xxh-portable/raw/master/result/xxh-portable-musl-alpine-Linux-x86_64.tar.gz \ && mkdir -p $XH && cd $XH \ && ( [[ -x $(command -v curl) ]] && curl -L $XD || wget -O- $XD ) | tar zxf - xxh \ && echo 'Usage: ./xxh local [+s xonsh/zsh/fish/osquery/bash]'
Next time you're on the host just run ~/.xxh/xxh local and you will enter your xxh environment.
xxh anyhost +s xonsh
anyhost> python --version
Python 3.8.2
You'll get python-powered xonsh shell with portable python and pip on the host without any system installations on the host. You can install PyPi packages manually or bring them with you automatically by using xxh-plugin-prerun-dotfiles. Also, don't forget about xxh-plugins like zoxide.
xxh +RI xxh-plugin-prerun-python
xxh anyhost +s zsh
anyhost> python --version
Python 3.8.2
anyhost> pip install pandas
Using xxh-plugin-prerun-python you'll get a portable Python AppImage which can be used on a host without python and with any xxh shell.
xxh +RI xxh-plugin-prerun-docker
xxh anyhost +if
anyhost> xxh-docker-run
anyhost> docker ps
CONTAINER ID IMAGE COMMAND
anyhost> docker run --rm hello-world | grep Hello
Hello from Docker!
anyhost> xxh-docker-stop
There is the xxh-plugin-prerun-dotfiles plugin which creates config files when you go to the host using xxh. You can fork it and create your cozy settings once and forever.
source xxh.zsh anyhost +I xxh-plugin-zsh-ohmyzsh +if +q
This command brings your current Oh My Zsh session theme to the xxh session. If you need more complex settings just fork the xxh-plugin-zsh-ohmyzsh and hack it.
$ xxh anyhost +s osquery
osquery> SELECT * FROM users WHERE username='news';
+-----+-----+----------+-------------+-----------------+-------------------+
| uid | gid | username | description | directory | shell


企业专属的AI法律顾问
iTerms是法大大集团旗下法律子品牌,基于最先进的大语言模型(LLM)、专业的法律知识库和强大的智能体架构,帮助企业扫清合规障碍,筑牢风控防线,成为您企业专属的AI法律顾问。


稳定高效的流量提升解决方案,助力品牌曝光
稳定高效的流量提升解决方案,助力品牌曝光


最新版Sora2模型免费使用,一键生成无水印视频
最新版Sora2模型免费使用,一键生成无水印视频


实时语音翻译/同声传译工具
Transly是一个多场景的AI大语言模型驱动的同声传译、专业翻译助手,它拥有超精准的音频识别翻译能力,几乎零延迟的使用体验和支持多国语言可以让你带它走遍全球,无论你是留学生、商务人士、韩剧美剧爱好者,还是出国游玩、多国会议、跨国追星等等,都可以满足你所有需要同传的场景需求,线上线下通用,扫除语言障碍,让全世界的语言交流不再有国界。


选题、配图、成文,一站式创作,让内容运营更高效
讯飞绘文,一个AI集成平台,支持写作、选题、配图、排版和发布。高效生成适用于各类媒体的定制内容,加速品牌传播,提升内容营销效果。


AI辅助编程,代码自动修复
Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。


最强AI数据分析助手
小浣熊家族Raccoon,您的AI智能助手,致力于通过先进的人工智能技术,为用户提供高效、便捷的智能服务。无论是日常咨询还是专业问题解答,小浣熊都能以快速、准确的响应满足您的需求,让您的生活更加智能便捷。


像人一样思考的AI智能体
imini 是一款超级AI智能体,能根据人类指令,自主思考、自主完成、并且交付结果的AI智能体。


AI数字人视频创作平台
Keevx 一款开箱即用的AI数字人视频创作平台,广泛适用于电商广告、企业培训与社媒宣传,让全球企业与个人创作者无需拍摄剪辑,就能快速生成多语言、高质量的专业视频。


一站式AI创作平台
提供 AI 驱动的图片、视频生成及数字人等功能,助力创意创作
最新AI工具、AI资讯
独家AI资源、AI项目落地

微信扫一扫关注公众号