xxh/xxh-shell-xonsh

GitHub: xxh/xxh-shell-xonsh

基于 xxh 框架的 xonsh shell 入口,通过 SSH 连接任意主机时无需安装即可使用 Python 驱动的 xonsh 环境。

Stars: 59 | Forks: 8

xxhxonsh shell 入口。无需在主机上安装,即可通过 SSH 在任何地方使用 xonsh。

如果你喜欢这个想法,请点击仓库中的 ⭐ 并发推

## 安装 从 xxh 仓库安装: ``` xxh +I xxh-shell-xonsh # 或来自 repo:xxh +I xxh-shell-xonsh+git+https://github.com/xxh/xxh-shell-xonsh ``` ## 连接 ``` xxh yourhost +s xonsh +if ``` 为了避免每次都添加 `+s`,请在 `~/.config/xxh/config.xxhc` (`$XDG_CONFIG_HOME`) 中使用 xxh 配置: ``` hosts: ".*": # Regex for all hosts +s: xonsh ``` ## 使用 python, pip 和 [xontribs](https://xon.sh/xontribs.html) `xonsh.AppImage` 默认包含 `python` 和 `pip`。你可以照常更新 pip 并安装包和 [xontribs](https://github.com/topics/xontrib): ``` myhost> pip install -U pip myhost> pip install pandas myhost> xpip install xontrib-prompt-bar ``` 包的位置遵循 [密闭原则](https://github.com/xxh/xxh/wiki#the-ideas-behind-xxh): | xxh 命令 | pip 包主目录 | 用户主目录 | | ------- | ---------- | --------- | | `xxh myhost` | `/home/user/.xxh/.local` | `/home/user/.xxh` | | `xxh myhost +hhh '~'` | `/home/user/.xxh/.local` | `/home/user` | | `xxh myhost +hhh '~' +hhx '~'` | `/home/user/.local` | `/home/user` | 注意!默认情况下,包将安装在用户目录中,即 `~/.local`。如果你使用包管理器(例如 `mamba`, `conda`),请在虚拟环境激活后设置 `$PYTHONNOUSERSITE=1`([文档](https://docs.python.org/3/using/cmdline.html#envvar-PYTHONNOUSERSITE))。 ## 插件 **xonsh xxh 插件** 是一组在使用 xxh 时会运行的 xsh 脚本。你可以创建包含自己喜欢的别名、工具或配色主题的 xxh 插件,xxh 会将它们带到你的 SSH 会话中。 置顶的 xxh xonsh 插件:[autojump](https://github.com/xxh/xxh-plugin-xonsh-autojump)。 🔎 [在 Github 上搜索 xxh 插件](https://github.com/search?q=xxh-plugin-xonsh&type=Repositories) 或 [Bitbucket](https://bitbucket.org/repo/all?name=xxh-plugin-xonsh) 或 💡 [创建 xxh 插件](https://github.com/xxh/xxh-plugin-xonsh-example) ## 无缝模式 将环境变量添加到 `env` 文件中,并使用 `source` 命令将它们带到主机: ``` source xxh.xsh myhost ``` ## Alpine Linux * [如何在 Alpine 上运行 xonsh AppImage?](https://github.com/xonsh/xonsh/discussions/4158#discussioncomment-462032) ## 致谢 * @probonopd 提供 https://github.com/AppImage * @niess 提供 https://github.com/niess/linuxdeploy-plugin-python/
标签:AppImage, Awesome, Python, Shell, SSH, Web应用防火墙, Xonsh, xxh, 便携环境, 免安装, 内存分配, 无后门, 系统管理, 网络调试, 自动化, 运维工具, 远程访问, 逆向工具