<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,就用扣子
AI办公助手,复杂任务高效处理。办公效率低?扣子空间AI助手支持播客生成、PPT制作、网页开发及报告写作,覆盖科研、商业、舆情等领域的专家Agent 7x24小时响应,生活工作无缝切换,提升50%效率!


多风格AI绘画神器
堆友平台由阿里巴巴设计团队创建,作为一款AI驱动的设计工具,专为设计师提供一站式增长服务。功能覆盖海量3D素材、AI绘画、实时渲染以及专业抠图,显著提升设计品质和效率。平台不仅提供工具,还是一个促进创意交流和个人发展的空间,界面友好,适合所有级别的设计师和创意工作者。


零代码AI应用开发平台
零代码AI应用开发平台,用户只需一句话简单描述需求,AI能自动生成小程序、APP或H5网页应用,无需编写代码。


免费创建高清无水印Sora视频
Vora是一个免费创建高清无水印Sora视频的AI工具


最适合小白的AI自动化工作流平台
无需编码,轻松生成可复用、可变现的AI自动化工作流

大模型驱动的Excel数据处理工具
基于大模型交互的表格处理系统,允许用户通过对话方式完成数据整理和可视化分析。系统采用机器学习算法解析用户指令,自动执行排序、公式计算和数据透视等操作,支持多种文件格式导入导出。数据处理响应速度保持在0.8秒以内,支持超过100万行数据的即时分析。


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


AI论文写作指导平台
AIWritePaper论文写作是一站式AI论文写作辅助工具,简化了选题、文献检索至论文撰写的整个过程。通过简单设定,平台可快速生成高质量论文大纲和全文,配合图表、参考文献等一应俱全,同时提供开题报告和答辩PPT等增值服务,保障数据安全,有效提升写作效率和论文质量。


AI一键生成PPT,就用博思AIPPT!
博思AIPPT,新一代的AI生成PPT平台,支持智能生成PPT、AI美化PPT、文本&链接生成PPT、导入Word/PDF/Markdown文档生成PPT等,内置海量精美PPT模板,涵盖商务、教育、科技等不同风格,同时针对每个页面提供多种版式,一键自适应切换,完美适配各种办公场景。


AI赋能电商视觉革命,一站式智能商拍平台
潮际好麦深耕服装行业, 是国内AI试衣效果最好的软件。使用先进AIGC能力为电商卖家批量提供优质的、低成本的商拍图。合作品牌有Shein、Lazada、安踏、百丽等65个国内外头部品牌,以及国内10万+淘宝、天猫、京东等主流平台的品牌商家,为卖家节省将近85%的出图成本,提升约3倍出图效率,让品牌能够快速上架。
最新AI工具、AI资讯
独家AI资源、AI项目落地

微信扫一扫关注公众号