--- id: xonsh version: "0.24.1" license: BSD 2-Clause License license_treatment: permissive maintenance: active --- # xonsh — Python-powered shell. Full-featured, cross-platform and AI-friendly. License: permissive · Maintenance: active · Downloads: 390.6K/mo ## What it is and what it does Xonsh is a full-featured shell that treats Python 3 as its base language and adds shell syntax on top, rather than the reverse. You write commands using Python expressions, list comprehensions, and imports directly in the shell, and invoke external programs with shell-style syntax. It runs on Linux, macOS, Windows, BSD, and other platforms, and integrates with Jupyter notebooks. The package is useful when you want to automate tasks, manage system operations, or explore data interactively without switching between a Python REPL and a traditional shell. It supports an extension system called xontribs for adding features like custom prompts, keybindings, and integrations with tools like Starship, ChatGPT, and GitHub Copilot. With no runtime dependencies, it installs cleanly and works out of the box. Use it for: - Write shell scripts that leverage Python's data structures, comprehensions, and standard library without subprocess calls. - Interactively explore files and system state using Python syntax (e.g., p'/etc/passwd'.read_text()) alongside traditional commands. - Automate DevOps tasks by mixing shell commands with Python logic in a single script without context switching. - Build reproducible workflows in tools like Snakemake that need both shell commands and Python control flow. - Extend the shell with custom keybindings and event handlers using Python decorators and event hooks. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Xonsh is a Python-based shell that merges Python 3 syntax with shell commands, letting you write scripts and interactive sessions using both languages seamlessly in one environment. Yes. Xonsh is actively maintained, has no external runtime dependencies, and offers a genuinely novel way to combine Python and shell scripting. It's worth trying if you spend significant time in both environments and want to unify them. The permissive license and broad platform support make it low-risk to evaluate. Start with the tutorial at xon.sh/tutorial.html to see if the syntax and workflow fit your needs. ## Install pip install xonsh uv add xonsh poetry add xonsh ## Installing xonsh Before you install: Low friction install with wheels available for Python 3.11 through 3.14. Active maintenance with a recent release (14 days old) and steady community engagement (9600 GitHub stars). No runtime dependencies to manage. License in practice: BSD 2-Clause License is permissive, allowing use in both open-source and proprietary projects with minimal restrictions beyond attribution. Quickstart: pip install xonsh # Start the shell xonsh # In xonsh, mix Python and shell: echo @('hello'.upper()) var = $(ls -la) print(len(var)) Requires Python 3.11 or later. Verify before relying: - Whether xonsh works identically across all advertised platforms (Linux, macOS, Windows, BSD, Jupyter, Android, Raspberry Pi) or if some have limitations. - Performance characteristics when running complex Python scripts or long-running shell sessions compared to traditional shells. - Compatibility with existing shell scripts written for bash or zsh without modification. ## Package facts - License: BSD 2-Clause License (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 390.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags python shell interpreter, cross-platform shell scripting, python command line interface, shell with python syntax, interactive python shell environment, bash alternative python, python-powered terminal, shell-scripting, python-repl, cross-platform [View on SkillFed](https://skillfed.io/packages/xonsh) · [View on PyPI](https://pypi.org/project/xonsh/)