macOS
brew install xonshlocal Homebrew formula metadata
sudo port install xonshMacPorts ports tree · shells/xonsh/Portfile · 来源: api.github.com
安装
brew install xonshlocal Homebrew formula metadata
sudo port install xonshMacPorts ports tree · shells/xonsh/Portfile · 来源: api.github.com
sudo apk add xonshAlpine Linux edge package indexes · xonsh · 来源: dl-cdn.alpinelinux.org
sudo dnf install xonshFedora Rawhide package metadata · xonsh · 来源: dl.fedoraproject.org
nix profile install nixpkgs#xonshnixpkgs package indexes · pkgs/by-name/xo/xonsh/package.nix · 来源: api.github.com
sudo pacman -S xonshArch Linux sync databases · xonsh · 来源: geo.mirror.pkgbuild.com
sudo zypper install xonshopenSUSE Tumbleweed package metadata · xonsh · 来源: download.opensuse.org
概览
Python-powered, cross-platform, Unix-gazing shell language and command prompt
历史
Xonsh is a Python-powered shell and command prompt that treats Python as the command language while adding shell syntax for subprocesses, environment handling, path work, tab completion, and prompts. Its package-nerd hook is that it is both an interactive shell and an installable Python ecosystem: users can script with normal Python objects, run ordinary Unix commands, and extend the prompt with xontribs.
The project sits in the same alternative-shell conversation as fish, zsh, IPython, and Nushell, but its distinguishing bet is conservative and unusual: do not invent a completely new programming language when Python can be the shell language.
Anthony Scopatz's FAQ says the idea for xonsh came while reviewing the Bash chapter of Effective Computation in Physics and noticing how much shell practice depends on complex conventions for basic programming constructs. The FAQ frames xonsh as an answer to shells that do not fit the user's brain: Python supplies the familiar programming substrate, while xonsh adds enough shell behavior to make it usable as a daily command prompt.
The GitHub repository was created on 2015-01-21. The documentation and README describe xonsh as a superset of Python 3 with seamless integration of shell functionality and commands, implemented by parsing xonsh code into Python AST nodes and deciding between Python mode and subprocess mode when command-like input is ambiguous.
By 2016 xonsh had enough visibility for talks at PyCon and PyBay and coverage in developer publications. Later official talk listings include SciPy 2019 presentations, showing that the project found an audience among scientific Python, data, and systems users who wanted shell ergonomics without leaving the Python runtime.
Xonsh adoption has been strongest among Python-heavy developers, data scientists, and automation users who already value Python syntax and libraries. The project README explicitly demonstrates running subprocesses, mutating PATH, reading files with Python path literals, loading xontribs, and interop with tools such as Jupyter, Starship, and prompt integrations.
Its adoption pattern is less about replacing POSIX shell everywhere and more about creating a daily-driver shell for people who prefer Python's data structures, imports, and expression syntax. The official docs stress cross-platform support across Linux, macOS, Windows, BSD, Jupyter, Android, Raspberry Pi, WSL, Nix, AppImage, Flatpak, and other environments, which made it a natural package-manager item rather than a single-platform shell experiment.
Typical use is interactive: set xonsh as a login or terminal shell, keep startup code in xonsh rc files, run normal external commands, and drop into Python expressions when shell text processing would be awkward. The tutorial emphasizes Python-mode versus subprocess-mode, environment variables as Python-accessible values, and explicit subprocess syntax for cases where ambiguity matters.
For automation, xonsh is useful when a task needs both shell pipelines and real Python data handling. Users commonly reach for it to glue command-line tools, JSON output, Python imports, prompt customization, and cross-platform path/environment logic without splitting the workflow between Bash and standalone Python scripts.
Xonsh is package-nerd significant because it makes the shell itself an application-runtime choice. Installing it changes not just one command but the language used at the prompt, the configuration files a user maintains, and the extension surface exposed through xontribs.
It is also a useful counterexample to the idea that every shell needs its own bespoke scripting language. Xonsh's design shows a different packaging story: ship a shell that borrows the host language's parser, AST, libraries, and package ecosystem, then add only the command-line affordances needed to make it feel native at a terminal.
安全态势
generalized runtime or code generation signal.
yellow 风险 · 中 置信度 · runtime
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
local files
These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.
Config paths the tool may read or write during local use.
~/.xonshrc~/.config/xonsh/rc.xsh/etc/xonsh/xonshrc~/.config/xonsh/rc.d//etc/xonsh/rc.d/%ALLUSERSPROFILE%\xonsh\xonshrc可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
xonsh | cli | 全局可执行文件 | |
xonsh-cat | cli | 全局可执行文件 | |
xonsh-uname | cli | 全局可执行文件 | |
xonsh-uptime | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
安装元数据
| 软件包键 | brew:xonsh |
|---|---|
| 版本 | 0.24.0 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/xonsh |
| 主页 | https://xon.sh |
| 仓库 | https://github.com/xonsh/xonsh |
| 上游文档 | https://xon.sh/contents.html |
| 许可证 | BSD-2-Clause-Views |
| 源码归档 | https://files.pythonhosted.org/packages/1e/82/a70fcbd8e542a55b990c61707c4f26fd42071badd3c08193931706a10323/xonsh-0.24.0.tar.gz |
| 最后更新 | 2026-07-03T13:30:45Z |
| Pulse | updated |
| 依赖 | python@3.14 |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | xonsh |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
xonsh 0.19.4+dfsg-1
Python-powered, cross-platform, Unix-gazing shell
sudo apt install xonshxonsh-doc 0.19.4+dfsg-1
Python-powered, cross-platform, Unix-gazing shell (documentation)
sudo apt install xonsh-docxonsh
nix profile install nixpkgs#xonshxonsh 0.14.4+dfsg-1
Python-powered, cross-platform, Unix-gazing shell
sudo apt install xonshxonsh-doc 0.14.4+dfsg-1
Python-powered, cross-platform, Unix-gazing shell (documentation)
sudo apt install xonsh-docxonsh 0.22.8-r0
Python-powered, full-featured and cross-platform shell
sudo apk add xonshxonsh-pyc 0.22.8-r0
Precompiled Python bytecode for xonsh
sudo apk add xonsh-pycxonsh 0.23.1-2.fc45
A general purpose, Python-ish shell
sudo dnf install xonshxonsh 0.23.8-1
A python-powered shell. Full-featured and cross-platform.
sudo pacman -S xonshxonsh 0.23.1-1.1
A general purpose, Python-powered shell
sudo zypper install xonshxonsh-doc 0.23.1-1.1
Documentation files for xonsh
sudo zypper install xonsh-docxonsh
sudo port install xonsh来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.