Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<p align="center">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.</p>
<p align="center">You stuffed your 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 or system installations.</p>

<p align="center">
If you like the idea of xxh click ⭐ on the repo and <a href="https://twitter.com/intent/tweet?text=Bring%20your%20favorite%20shell%20wherever%20you%20go%20through%20the%20ssh.&url=https://github.com/xxh/xxh" target="_blank">tweet</a>.
If you like the idea of xxh click ⭐ on the repo and <a href="https://twitter.com/intent/tweet?text=Bring%20your%20favorite%20shell%20wherever%20you%20go%20through%20the%20ssh.&url=https://github.com/xxh/xxh" target="_blank">tweet</a> about it.
</p>

<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>
Expand All @@ -12,14 +12,14 @@ If you like the idea of xxh click ⭐ on the repo and <a href="https://twitter.c
<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 a prime focus.</td>
<td valign="top" style="border: 0px !important;"><b>Hermetic</b>. Deleting <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 blindfold 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>
<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>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> 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 the 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>
<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>
Expand Down Expand Up @@ -69,7 +69,7 @@ To run AppImage on Alpine Linux [install](https://github.com/sgerrand/alpine-pkg

## Shells

Currently supported OS for target host is Linux on x86_64.
Currently supported OS for the target host is Linux on x86_64.

| xxh-shell | status | [xxh-plugins](https://github.com/xxh/xxh/wiki#plugins) | [seamless](https://github.com/xxh/xxh/wiki#seamless-mode) | demo |
|-----------------------------------------------------------------------|------------|-------------|---------|------|
Expand All @@ -84,9 +84,9 @@ Currently supported OS for target host is Linux on x86_64.
[Search xxh shell on Github](https://github.com/search?q=xxh-shell&type=Repositories) or [Bitbucket](https://bitbucket.org/repo/all?name=xxh-shell) or [create your shell entrypoint](https://github.com/xxh/xxh-shell-example) to use another portable shell.

### Prerun plugins
[Prerun plugins](https://github.com/xxh/xxh/wiki#plugins) allow you to bring any portable tools, dotfiles or aliases to xxh session before running shell.
[Prerun plugins](https://github.com/xxh/xxh/wiki#plugins) allow you to bring any portable tools, dotfiles, or aliases to your xxh session before running the shell.

Pinned plugins: **[core](https://github.com/xxh/xxh-plugin-prerun-core)** (xxh-sudo, xxh-screen, xxh-tmux), **[dotfiles](https://github.com/xxh/xxh-plugin-prerun-dotfiles)**, **[docker](https://github.com/xxh/xxh-plugin-prerun-docker)**, **[python](https://github.com/xxh/xxh-plugin-prerun-python)**, **[xxh](https://github.com/xxh/xxh-plugin-prerun-xxh)**, **[vim](https://github.com/xxh/xxh-plugin-prerun-vim)**, **[zoxide](https://github.com/xxh/xxh-plugin-prerun-zoxide)**, **[starship](https://github.com/izissise/xxh-plugin-prerun-starship)**. There is [cookiecutter template to create prerun plugin](https://github.com/xxh/cookiecutter-xxh-plugin-prerun).
Pinned plugins: **[core](https://github.com/xxh/xxh-plugin-prerun-core)** (xxh-sudo, xxh-screen, xxh-tmux), **[dotfiles](https://github.com/xxh/xxh-plugin-prerun-dotfiles)**, **[docker](https://github.com/xxh/xxh-plugin-prerun-docker)**, **[python](https://github.com/xxh/xxh-plugin-prerun-python)**, **[xxh](https://github.com/xxh/xxh-plugin-prerun-xxh)**, **[vim](https://github.com/xxh/xxh-plugin-prerun-vim)**, **[zoxide](https://github.com/xxh/xxh-plugin-prerun-zoxide)**, **[starship](https://github.com/izissise/xxh-plugin-prerun-starship)**. There is [cookiecutter template to create a prerun plugin](https://github.com/xxh/cookiecutter-xxh-plugin-prerun).

## Usage
Use `xxh` instead of `ssh` when connecting to Linux hosts without changing ssh arguments:
Expand All @@ -109,9 +109,9 @@ xxh anyhost +hh /tmp/xxh +hhr # Upload xxh to /tmp/xxh and r
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](https://github.com/xxh/xxh/wiki#config-file).
For reusing arguments and simplifying xxh usage (like shortening to `xxh anyhost`), there is a [config file](https://github.com/xxh/xxh/wiki#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 the 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. Also see the [discussion](https://github.com/xxh/xxh/issues/129).
**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](https://github.com/xxh/xxh/issues/129).

### Installing xxh packages
```bash
Expand All @@ -133,7 +133,7 @@ xxh +I xxh-shell-example+path+/home/user/my-xxh-dev/xxh-shell-example
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
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
Expand All @@ -147,7 +147,7 @@ XH=~/.xxh \
&& ( [[ -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.
Next time you're on the host just run `~/.xxh/xxh local` and you will enter your xxh environment.

## Examples of use cases
### Python with pip everywhere without installation
Expand All @@ -159,7 +159,7 @@ anyhost> python --version
Python 3.8.2
```
You'll get python-powered [xonsh](https://xon.sh) 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](https://github.com/xxh/xxh-plugin-prerun-dotfiles). Also don't forget about xxh-plugins like [zoxide](https://github.com/xxh/xxh-plugin-prerun-zoxide).
You can install PyPi packages manually or bring them with you automatically by using [xxh-plugin-prerun-dotfiles](https://github.com/xxh/xxh-plugin-prerun-dotfiles). Also, don't forget about xxh-plugins like [zoxide](https://github.com/xxh/xxh-plugin-prerun-zoxide).

#### Way 2. Using portable python on any xxh shell
```
Expand Down Expand Up @@ -211,8 +211,8 @@ osquery> SELECT * FROM users WHERE username='news';
+-----+-----+----------+-------------+-----------------+-------------------+
```

### 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
### 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](https://github.com/xxh/xxh-shell-bash) xxh-shell is one of these
platforms that could be forked and stuffed.

Expand Down Expand Up @@ -244,8 +244,8 @@ platforms that could be forked and stuffed.

### xxh Development Environment

In the [xxh development environment](https://github.com/xxh/xxh/tree/master/xde) there is full [dockerised](https://www.docker.com/) environment
for development, testing and contribution. The process of testing and development is orchestrated by `xde` tool and is as
In the [xxh development environment](https://github.com/xxh/xxh/tree/master/xde) there is a full [dockerised](https://www.docker.com/) environment
for development, testing, and contribution. The process of testing and development is orchestrated by `xde` tool and is as
easy as possible.

### Vagrant based Plugin Development
Expand All @@ -258,7 +258,7 @@ See [the Plugin Development folder](./plugin-development) for more details

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.](https://github.com/xxh/xxh/issues/50)
newbie in another shell and mutual assistance is the key to xxh evolution. [Ask to join.](https://github.com/xxh/xxh/issues/50)

## Thanks
* **niess** for great [python-appimage](https://github.com/niess/python-appimage)
Expand Down