https://github.com/xxh/xxh Skip to content Sign up * Why GitHub? + Features + Mobile + Actions + Codespaces + Packages + Security + Code review + Issues + Integrations + GitHub Sponsors + Customer stories * Team * Enterprise * Explore + Explore GitHub + Learn and contribute + Topics + Collections + Trending + Learning Lab + Open source guides + Connect with others + The ReadME Project + Events + Community forum + GitHub Education + GitHub Stars program * Marketplace * Pricing + Plans + Compare plans + Contact Sales + Education [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} xxh / xxh Public * * Notifications * Star 2.1k * Fork 48 * Bring your favorite shell wherever you go through the ssh. BSD-2-Clause License 2.1k stars 48 forks Star Notifications * Code * Issues 8 * Pull requests 0 * Actions * Wiki * Security * Insights More * Code * Issues * Pull requests * Actions * Wiki * Security * Insights master Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show Loading {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default Loading View all tags 2 branches 85 tags Code Loading Latest commit @anki-code anki-code Update README.md ... cfe83fb Dec 9, 2021 Update README.md cfe83fb Git stats * 721 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github Moving xxh development environment from xxh/xxh-dev to xxh/xxh/xde Mar 15, 2021 appimage Build scripts Mar 14, 2021 portable-musl-alpine Build scripts Mar 14, 2021 xde Update README.md Mar 31, 2021 xxh cleaning Apr 1, 2021 .gitattributes Create .gitattributes Oct 2, 2020 .gitignore 0.6.0 Mar 17, 2020 LICENSE Create LICENSE Mar 10, 2020 MANIFEST.in Create MANIFEST.in Sep 10, 2020 README.md Update README.md Dec 9, 2021 setup.py Moved Python package Mar 15, 2021 xxh-appimage-build.xsh Build scripts Mar 14, 2021 xxh-appimage.Dockerfile Build scripts Mar 14, 2021 xxh-portable-musl-alpine-build.xsh Build scripts Mar 14, 2021 xxh-portable-musl-alpine.Dockerfile Cleaning Mar 31, 2021 View code [ ] Installation methods PyPi 3 pipx - good alternative to brew and pip, read comparison Conda-forge feedstock Homebrew Macports Linux portable binary Linux AppImage Shells Prerun plugins Usage Installing xxh packages Using xxh inplace without ssh connection Examples of use cases Python with pip everywhere without installation Way 1. Using xonsh Way 2. Using portable python on any xxh shell Using docker on host without root access Bring dotfiles to xxh session Seamless Oh My Zsh (demo) Read host as a table with osquery All in one portable home Questions and answers Development Thanks README.md You stuffed command shell with aliases, tools and colors but you lose it all when using ssh. The mission of xxh is to bring your favorite shell wherever you go through ssh without root access and system installations. If you like the idea of xxh click on the repo and tweet. [xxh demo] Portable. Preparing Hermetic. Deleting ~ Careful. No blindfold portable shells and /.xxh directory from copying config files plugins occurs locally the remote host will from local to remote and then xxh uploads make the remote host. Following privacy the result to the environment function and repeatability host. No installations as if xxh was never practices the best way or root access on the there. By default is to fork the xxh host required. your home is the .xxh plugin or shell example Security and host directory and you can and pack your configs environment a prime choose the hermetic into it. focus. level of your xxh session. Be open and fork-ready Do more. The xxh Chameleon. Switching the . Every xxh repo could packages are not only shells is as easy as be forked, customized about shells. Any possible and you don't and reused without type of tool or code have to be locked in to waiting for a package could be behind an one shell. Choose your management system, xxh entrypoint. If you current shell based on release or any third want to run browsh on the task you want to party packages. Five the remote host, just solve: xxh anyhost +s shells are currently put its portable xonsh for a python supported and more version as an environment, osquery for could be added by the entrypoint in the simple querying, fish community. xxh-shell. for modern features or time-tested zsh and bash for speed. Installation methods PyPi 3 pip3 install xxh-xxh pipx - good alternative to brew and pip, read comparison pipx 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.7/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.7/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 target host is Linux on x86_64. xxh-shell status xxh-plugins seamless demo xonsh stable autojump, [+] xxh.xsh demo zsh stable ohmyzsh, p10k, [+] xxh.zsh demo fish stable ohmyfish, fisher, userconfig, [+] todo bash stable ohmybash, [+] xxh.bash demo 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 xxh session before running shell. Pinned plugins: core (xxh-sudo, xxh-screen), dotfiles, docker, python , xxh, vim, zoxide. There is cookiecutter template to create prerun plugin. Usage Use xxh instead of ssh when connecting to Linux hosts without changing ssh arguments: xxh 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 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 the xxh arguments to save the ability to use minus sign for the original ssh arguments. This allows just replace the first two letters in the ssh command to convert it to the xxh command. 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+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 Using xxh inplace without ssh connection 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 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 host just run ~/.xxh/xxh local and you will enter your xxh environment. Examples of use cases Python with pip everywhere without installation Way 1. Using xonsh 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. Way 2. Using portable python on any xxh shell 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. Using docker on host without root access Try xxh-plugin-prerun-docker: 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 Bring dotfiles to xxh session 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. Seamless Oh My Zsh (demo) 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. Read host as a table with osquery $ xxh anyhost +s osquery osquery> SELECT * FROM users WHERE username='news'; +-----+-----+----------+-------------+-----------------+-------------------+ | uid | gid | username | description | directory | shell | +-----+-----+----------+-------------+-----------------+-------------------+ | 9 | 9 | news | news | /var/spool/news | /usr/sbin/nologin | +-----+-----+----------+-------------+-----------------+-------------------+ All in one portable home xxh is very agile. You can create your own xxh-shell (the shell part means it has an entrypoint) which can have any portable tools that could help you on the host. Bash xxh-shell is one of these platforms that could be forked and stuffed. Questions and answers * Welcome to xxh family + How it works o Simple answer o Detailed workflow with code + Plugins + Connection speed + Seamless mode + Config file * Packages for xxh + Install shells and plugins * Advanced + How to set /home/user as home on host + Using sudo + Using xxh in xxh session + Target host is behind another host + Environment variables * Development and contribution + The easiest way to debug shell and plugins + Prerun plugins + Change plugin run order * New questions Development In the xxh development environment there is full dockerised environment for development, testing and contribution. The process of testing and development is orchestrated by xde tool and is as easy as possible. We have teams. If you're in a team it does not mean you have an obligation to do something. The main goal of teams is to create groups of passionate people who could help or support solving complex problems. Some people could be an expert in one shell and a newbie in another shell and mutual assistance is the key to xxh evolution. Ask join. Thanks * niess for great python-appimage * probonopd and TheAssassin for hard-working AppImage * Anthony Scopatz, Gil Forsyth, Jamie Bliss, David Strobach, Morten Enemark Lund and @xore for amazing xonsh shell * Roman Perepelitsa for incredible statically-linked, hermetic, relocatable Zsh * Johannes Altmanninger and Fabian Homborg for extensive and portable fish shell About Bring your favorite shell wherever you go through the ssh. Topics linux shell bash zsh fish ssh devops awesome fisher openssh osquery powerlevel9k xonsh ohmyzsh hacking-tools ohmyfish powerlevel10k xxh ohmybash awesome-ssh Resources Readme License BSD-2-Clause License Releases 84 0.8.7 Latest Mar 14, 2021 + 83 releases Sponsor this project * patreon patreon.com/xonssh * https://www.buymeacoffee.com/xxh Used by 42 * @KevFrancisco * @krageon * @elihopk * @MohamedOmar2020 * @xxh * @xxh * @SolidHal * @rgeraskin + 34 Contributors 13 * @anki-code * @ammgws * @vladimyr * @idkjs * @chitoku-k * @onokatio * @seanfarley * @0xflotus * @dyuri * @petarvujovic98 * @Jonta + 2 contributors Languages * Python 91.4% * Shell 4.9% * Dockerfile 3.7% * (c) 2021 GitHub, Inc. * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.