Python-powered shell. Full-featured and cross-platform.
Project Links
Meta
Author: Anthony Scopatz
Maintainer: Xonsh Community
Requires Python: >=3.11
Classifiers
xonsh
=====
.. raw:: html
<img src="https://avatars.githubusercontent.com/u/17418188?s=200&v=4" alt="Xonsh shell icon." align="left" width="100px">
**Xonsh** is a Python-powered shell. Full-featured, cross-platform and AI-friendly. The language is a superset of Python 3 with seamless integration of shell functionality and commands. The name Xonsh should be pronounced like "consh" โ a softer form of the word "conch" (๐, ``@``), referring to the world of command shells.
.. raw:: html
<br clear="left"/>
.. list-table::
:widths: 1 1
* - **Xonsh is the Shell**
- **Xonsh is Python**
* - .. code-block:: shell
cd $HOME
id $(whoami) > ~/id.txt
cat /etc/passwd | grep root
$PROMPT = '@ '
- .. code-block:: python
2 + 2
var = "hello".upper()
@.imp.json.loads('{"a":1}')
[i for i in range(0,10)]
* - **Xonsh is the Shell in Python**
- **Xonsh is Python in the Shell**
* - .. code-block:: python
len($(curl -L https://xon.sh))
$PATH.append('/tmp')
p'/etc/passwd'.read_text().find('usr')
$(@json podman ps --format json)['ID']
- .. code-block:: python
name = 'snail'
echo @(name) > /tmp/@(name)
with p'/tmp/dir'.mkdir().cd():
touch @(input('File: '))
aliases['e'] = 'echo @(2+2)'
aliases['a'] = lambda args: print(args)
* - **Xonsh is a Meta-Shell**
- **Xonsh is an Ecosystem**
* - .. code-block:: python
xontrib load sh \
fish_completer
def nudf(cmd):
return @.imp.pandas.DataFrame(
@.imp.json.loads(
$(nu -c @(cmd+'| to json'))))
nudf!(ls -la)
aliases['ai'] = 'ollama run llama3'
ai! how to remove images in podman
- .. code-block:: python
xontrib load term_integration \
prompt_starship \
powerline \
dracula \
chatgpt \
django \
jupyter \
1password \
github_copilot \
history_encrypt
If you like xonsh, :star: the repo and spread the word about xonsh.
.. class:: center
.. image:: https://img.shields.io/badge/Zulip%20Community-xonsh-green
:target: https://xonsh.zulipchat.com/
:alt: Join to xonsh.zulipchat.com
.. image:: https://repology.org/badge/tiny-repos/xonsh.svg
:target: https://repology.org/project/xonsh/versions
:alt: repology.org
.. image:: https://img.shields.io/badge/Docker%20Hub-xonsh-blue
:target: https://hub.docker.com/u/xonsh
:alt: hub.docker.com
.. image:: https://img.shields.io/badge/AppImage-xonsh-lightblue
:target: https://xon.sh/appimage.html
:alt: AppImage
.. image:: https://github.com/xonsh/xonsh/actions/workflows/test.yml/badge.svg
:target: https://github.com/xonsh/xonsh/actions/workflows/test.yml
:alt: GitHub Actions
.. image:: https://codecov.io/gh/xonsh/xonsh/branch/master/graphs/badge.svg?branch=main
:target: https://codecov.io/github/xonsh/xonsh?branch=main
:alt: codecov.io
First steps
***********
- `Installation <https://github.com/xonsh/xonsh/blob/refactor_install_docs/docs/install.rst>`_ - isolated environment, package, container or portable AppImage.
- `Tutorial <https://xon.sh/tutorial.html>`_ - step by step introduction in xonsh.
- `Cheat sheet <https://github.com/anki-code/xonsh-cheatsheet>`_ - some beginners may find this a helpful place to start.
Extensions
**********
Xonsh has an extension/plugin system. We call these additions ``xontribs``.
- `Xontribs on Github <https://github.com/topics/xontrib>`_
- `Awesome xontribs <https://github.com/xonsh/awesome-xontribs>`_
- `Core xontribs <https://xon.sh/api/_autosummary/xontribs/xontrib.html>`_
- `Create a xontrib step by step from template <https://github.com/xonsh/xontrib-template>`_
Projects that use xonsh or compatible
*************************************
- `conda <https://conda.io/projects/conda/en/latest/>`_ and `mamba <https://mamba.readthedocs.io/en/latest/>`_: Modern package managers.
- `Starship <https://starship.rs/>`_: Cross-shell prompt.
- `zoxide <https://github.com/ajeetdsouza/zoxide>`_: A smarter cd command.
- `gitsome <https://github.com/donnemartin/gitsome>`_: Supercharged Git/shell autocompleter with GitHub integration.
- `xxh <https://github.com/xxh/xxh>`_: Using xonsh wherever you go through the SSH.
- `kash <https://github.com/jlevy/kash>`_: The knowledge agent shell.
- `Snakemake <https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#xonsh>`_: A workflow management system to create reproducible and scalable data analyses.
- `any-nix-shell <https://github.com/haslersn/any-nix-shell>`_: xonsh support for the ``nix run`` and ``nix-shell`` environments of the Nix package manager.
- `lix <https://github.com/lix-project/lix>`_: A modern, delicious implementation of the Nix package manager.
- `x-cmd <https://www.x-cmd.com/>`_: x-cmd is a vast and interesting collection of tools guided by the Unix philosophy.
- `rever <https://regro.github.io/rever-docs/>`_: Cross-platform software release tool.
- `Regro autotick bot <https://github.com/regro/cf-scripts>`_: Regro Conda-Forge autoticker.
Jupyter-based interactive notebooks via `xontrib-jupyter <https://github.com/xonsh/xontrib-jupyter>`_:
- `Jupyter and JupyterLab <https://jupyter.org/>`_: Interactive notebook platform.
- `Euporie <https://github.com/joouha/euporie>`_: Terminal based interactive computing environment.
- `Jupytext <https://jupytext.readthedocs.io/>`_: Clear and meaningful diffs when doing Jupyter notebooks version control.
Compiling, packaging, or accelerating xonsh:
- `AppImage <https://github.com/appimage>`_ is a format for distributing Linux applications and can be used to `create a standalone xonsh package <https://xon.sh/appimage.html>`_.
- `Nuitka <https://github.com/Nuitka/Nuitka>`_ is an optimizing Python compiler that can `build a native xonsh binary <https://github.com/xonsh/xonsh/issues/2895#issuecomment-3665753657>`_.
- `RustPython <https://github.com/RustPython/RustPython/>`_ is a Python interpreter written in Rust that can `run xonsh on top of Rust <https://github.com/xonsh/xonsh/issues/5082#issue-1611837062>`_.
Welcome to the xonsh shell community
************************************
The xonsh shell is developed by a community of volunteers. There are a few ways to help out:
- Write a note or an article about xonsh.
- Send a link to Xonsh to your favorite blogger.
- Add xonsh support in third party tool: `package manager <https://github.com/topics/package-manager>`_, `terminal emulator <https://github.com/topics/terminal-emulators>`_, `console tool <https://github.com/topics/console>`_, `IDE <https://github.com/topics/ide>`_.
- Give a star to xonsh repository and to `xontribs <https://github.com/topics/xontrib>`_ you like.
- Solve a `popular issue <https://github.com/xonsh/xonsh/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc>`_ or `high priority issue <https://github.com/xonsh/xonsh/issues?q=is%3Aopen+is%3Aissue+label%3Apriority-high+sort%3Areactions-%2B1-desc>`_ or a `good first issue <https://github.com/xonsh/xonsh/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22+sort%3Areactions-%2B1-desc>`_. You can start with the `Developer guide <https://xon.sh/devguide.html>`_. Feel free to use LLM e.g. `Github Copilot <https://github.com/copilot>`_.
- Take an `idea <https://github.com/xonsh/xontrib-template/issues?q=is%3Aopen+is%3Aissue+label%3Aidea+sort%3Areactions-%2B1-desc>`_ and `create a new xontrib <https://github.com/xonsh/xontrib-template#why-use-this-template>`_.
- Contribute to `xonsh API <https://github.com/xonsh/xonsh/tree/main/xonsh/api>`_.
- Become xonsh core developer by deep diving into xonsh internals. E.g. we feel a lack of Windows support.
- Test xonsh with compiler, interpreter, optimizer and report upstream issues (e.g. `Nuitka <https://github.com/xonsh/xonsh/issues/2895#issuecomment-3665753657>`_, `RustPython <https://github.com/xonsh/xonsh/issues/5082#issue-1611837062>`_).
- Design more `logos and images <https://github.com/anki-code/xonsh-logo>`_, improve `xonsh website <https://xon.sh/>`_ (`src <https://github.com/xonsh/xonsh/blob/12f12ce94f1b6c92218e22fbdaaa846e16ac8b2d/docs/_templates/index.html#L9>`_).
- `Become a sponsor to xonsh <https://github.com/sponsors/xonsh>`_.
We welcome new contributors!
Credits
*******
- Thanks to `Zulip <https://zulip.com/>`_ for supporting the `xonsh community <https://xonsh.zulipchat.com/>`_!
- Thanks to `HELLOTUX <https://www.hellotux.com/>`_ for distributing the `xonsh t-shirts, backpacks and more <https://www.hellotux.com/xonsh>`_!
- Thanks to ADS.FUND for supporting `xonsh token <https://ads.fund/token/0xadf7478450b69a349ed9634b18584d2d3da81464>`_!
=====
.. raw:: html
<img src="https://avatars.githubusercontent.com/u/17418188?s=200&v=4" alt="Xonsh shell icon." align="left" width="100px">
**Xonsh** is a Python-powered shell. Full-featured, cross-platform and AI-friendly. The language is a superset of Python 3 with seamless integration of shell functionality and commands. The name Xonsh should be pronounced like "consh" โ a softer form of the word "conch" (๐, ``@``), referring to the world of command shells.
.. raw:: html
<br clear="left"/>
.. list-table::
:widths: 1 1
* - **Xonsh is the Shell**
- **Xonsh is Python**
* - .. code-block:: shell
cd $HOME
id $(whoami) > ~/id.txt
cat /etc/passwd | grep root
$PROMPT = '@ '
- .. code-block:: python
2 + 2
var = "hello".upper()
@.imp.json.loads('{"a":1}')
[i for i in range(0,10)]
* - **Xonsh is the Shell in Python**
- **Xonsh is Python in the Shell**
* - .. code-block:: python
len($(curl -L https://xon.sh))
$PATH.append('/tmp')
p'/etc/passwd'.read_text().find('usr')
$(@json podman ps --format json)['ID']
- .. code-block:: python
name = 'snail'
echo @(name) > /tmp/@(name)
with p'/tmp/dir'.mkdir().cd():
touch @(input('File: '))
aliases['e'] = 'echo @(2+2)'
aliases['a'] = lambda args: print(args)
* - **Xonsh is a Meta-Shell**
- **Xonsh is an Ecosystem**
* - .. code-block:: python
xontrib load sh \
fish_completer
def nudf(cmd):
return @.imp.pandas.DataFrame(
@.imp.json.loads(
$(nu -c @(cmd+'| to json'))))
nudf!(ls -la)
aliases['ai'] = 'ollama run llama3'
ai! how to remove images in podman
- .. code-block:: python
xontrib load term_integration \
prompt_starship \
powerline \
dracula \
chatgpt \
django \
jupyter \
1password \
github_copilot \
history_encrypt
If you like xonsh, :star: the repo and spread the word about xonsh.
.. class:: center
.. image:: https://img.shields.io/badge/Zulip%20Community-xonsh-green
:target: https://xonsh.zulipchat.com/
:alt: Join to xonsh.zulipchat.com
.. image:: https://repology.org/badge/tiny-repos/xonsh.svg
:target: https://repology.org/project/xonsh/versions
:alt: repology.org
.. image:: https://img.shields.io/badge/Docker%20Hub-xonsh-blue
:target: https://hub.docker.com/u/xonsh
:alt: hub.docker.com
.. image:: https://img.shields.io/badge/AppImage-xonsh-lightblue
:target: https://xon.sh/appimage.html
:alt: AppImage
.. image:: https://github.com/xonsh/xonsh/actions/workflows/test.yml/badge.svg
:target: https://github.com/xonsh/xonsh/actions/workflows/test.yml
:alt: GitHub Actions
.. image:: https://codecov.io/gh/xonsh/xonsh/branch/master/graphs/badge.svg?branch=main
:target: https://codecov.io/github/xonsh/xonsh?branch=main
:alt: codecov.io
First steps
***********
- `Installation <https://github.com/xonsh/xonsh/blob/refactor_install_docs/docs/install.rst>`_ - isolated environment, package, container or portable AppImage.
- `Tutorial <https://xon.sh/tutorial.html>`_ - step by step introduction in xonsh.
- `Cheat sheet <https://github.com/anki-code/xonsh-cheatsheet>`_ - some beginners may find this a helpful place to start.
Extensions
**********
Xonsh has an extension/plugin system. We call these additions ``xontribs``.
- `Xontribs on Github <https://github.com/topics/xontrib>`_
- `Awesome xontribs <https://github.com/xonsh/awesome-xontribs>`_
- `Core xontribs <https://xon.sh/api/_autosummary/xontribs/xontrib.html>`_
- `Create a xontrib step by step from template <https://github.com/xonsh/xontrib-template>`_
Projects that use xonsh or compatible
*************************************
- `conda <https://conda.io/projects/conda/en/latest/>`_ and `mamba <https://mamba.readthedocs.io/en/latest/>`_: Modern package managers.
- `Starship <https://starship.rs/>`_: Cross-shell prompt.
- `zoxide <https://github.com/ajeetdsouza/zoxide>`_: A smarter cd command.
- `gitsome <https://github.com/donnemartin/gitsome>`_: Supercharged Git/shell autocompleter with GitHub integration.
- `xxh <https://github.com/xxh/xxh>`_: Using xonsh wherever you go through the SSH.
- `kash <https://github.com/jlevy/kash>`_: The knowledge agent shell.
- `Snakemake <https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#xonsh>`_: A workflow management system to create reproducible and scalable data analyses.
- `any-nix-shell <https://github.com/haslersn/any-nix-shell>`_: xonsh support for the ``nix run`` and ``nix-shell`` environments of the Nix package manager.
- `lix <https://github.com/lix-project/lix>`_: A modern, delicious implementation of the Nix package manager.
- `x-cmd <https://www.x-cmd.com/>`_: x-cmd is a vast and interesting collection of tools guided by the Unix philosophy.
- `rever <https://regro.github.io/rever-docs/>`_: Cross-platform software release tool.
- `Regro autotick bot <https://github.com/regro/cf-scripts>`_: Regro Conda-Forge autoticker.
Jupyter-based interactive notebooks via `xontrib-jupyter <https://github.com/xonsh/xontrib-jupyter>`_:
- `Jupyter and JupyterLab <https://jupyter.org/>`_: Interactive notebook platform.
- `Euporie <https://github.com/joouha/euporie>`_: Terminal based interactive computing environment.
- `Jupytext <https://jupytext.readthedocs.io/>`_: Clear and meaningful diffs when doing Jupyter notebooks version control.
Compiling, packaging, or accelerating xonsh:
- `AppImage <https://github.com/appimage>`_ is a format for distributing Linux applications and can be used to `create a standalone xonsh package <https://xon.sh/appimage.html>`_.
- `Nuitka <https://github.com/Nuitka/Nuitka>`_ is an optimizing Python compiler that can `build a native xonsh binary <https://github.com/xonsh/xonsh/issues/2895#issuecomment-3665753657>`_.
- `RustPython <https://github.com/RustPython/RustPython/>`_ is a Python interpreter written in Rust that can `run xonsh on top of Rust <https://github.com/xonsh/xonsh/issues/5082#issue-1611837062>`_.
Welcome to the xonsh shell community
************************************
The xonsh shell is developed by a community of volunteers. There are a few ways to help out:
- Write a note or an article about xonsh.
- Send a link to Xonsh to your favorite blogger.
- Add xonsh support in third party tool: `package manager <https://github.com/topics/package-manager>`_, `terminal emulator <https://github.com/topics/terminal-emulators>`_, `console tool <https://github.com/topics/console>`_, `IDE <https://github.com/topics/ide>`_.
- Give a star to xonsh repository and to `xontribs <https://github.com/topics/xontrib>`_ you like.
- Solve a `popular issue <https://github.com/xonsh/xonsh/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc>`_ or `high priority issue <https://github.com/xonsh/xonsh/issues?q=is%3Aopen+is%3Aissue+label%3Apriority-high+sort%3Areactions-%2B1-desc>`_ or a `good first issue <https://github.com/xonsh/xonsh/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22+sort%3Areactions-%2B1-desc>`_. You can start with the `Developer guide <https://xon.sh/devguide.html>`_. Feel free to use LLM e.g. `Github Copilot <https://github.com/copilot>`_.
- Take an `idea <https://github.com/xonsh/xontrib-template/issues?q=is%3Aopen+is%3Aissue+label%3Aidea+sort%3Areactions-%2B1-desc>`_ and `create a new xontrib <https://github.com/xonsh/xontrib-template#why-use-this-template>`_.
- Contribute to `xonsh API <https://github.com/xonsh/xonsh/tree/main/xonsh/api>`_.
- Become xonsh core developer by deep diving into xonsh internals. E.g. we feel a lack of Windows support.
- Test xonsh with compiler, interpreter, optimizer and report upstream issues (e.g. `Nuitka <https://github.com/xonsh/xonsh/issues/2895#issuecomment-3665753657>`_, `RustPython <https://github.com/xonsh/xonsh/issues/5082#issue-1611837062>`_).
- Design more `logos and images <https://github.com/anki-code/xonsh-logo>`_, improve `xonsh website <https://xon.sh/>`_ (`src <https://github.com/xonsh/xonsh/blob/12f12ce94f1b6c92218e22fbdaaa846e16ac8b2d/docs/_templates/index.html#L9>`_).
- `Become a sponsor to xonsh <https://github.com/sponsors/xonsh>`_.
We welcome new contributors!
Credits
*******
- Thanks to `Zulip <https://zulip.com/>`_ for supporting the `xonsh community <https://xonsh.zulipchat.com/>`_!
- Thanks to `HELLOTUX <https://www.hellotux.com/>`_ for distributing the `xonsh t-shirts, backpacks and more <https://www.hellotux.com/xonsh>`_!
- Thanks to ADS.FUND for supporting `xonsh token <https://ads.fund/token/0xadf7478450b69a349ed9634b18584d2d3da81464>`_!
0.22.8
Mar 17, 2026
0.22.7
Mar 10, 2026
0.22.6
Mar 05, 2026
0.22.5
Mar 05, 2026
0.22.4
Feb 17, 2026
0.22.3
Feb 04, 2026
0.22.2
Feb 03, 2026
0.22.1
Jan 14, 2026
0.22.0
Dec 19, 2025
0.21.2
Dec 10, 2025
0.21.1
Dec 10, 2025
0.21.0
Dec 10, 2025
0.20.0
Nov 24, 2025
0.19.9
Jun 24, 2025
0.19.8
Jun 24, 2025
0.19.3
Mar 19, 2025
0.19.2
Feb 11, 2025
0.19.1
Jan 13, 2025
0.19.0
Dec 09, 2024
0.18.4
Nov 02, 2024
0.18.3
Aug 20, 2024
0.18.2
Jul 18, 2024
0.18.1
Jul 17, 2024
0.17.0
Jun 18, 2024
0.16.0
Apr 23, 2024
0.15.1
Mar 07, 2024
0.15.0
Feb 25, 2024
0.14.4
Jan 16, 2024
0.14.3
Dec 05, 2023
0.14.2
Nov 17, 2023
0.14.1
Aug 16, 2023
0.14.0
May 19, 2023
0.13.4
Dec 08, 2022
0.13.3
Sep 15, 2022
0.13.2
Sep 15, 2022
0.13.1
Aug 10, 2022
0.13.0
Jul 08, 2022
0.12.6
Jun 21, 2022
0.12.5
Jun 17, 2022
0.12.4
May 08, 2022
0.12.3
May 08, 2022
0.12.2
Apr 25, 2022
0.12.1
Apr 15, 2022
0.12.0
Apr 14, 2022
0.11.0
Nov 17, 2021
0.10.1
Jul 24, 2021
0.10.0
Jul 24, 2021
0.9.27
Mar 03, 2021
0.9.26
Feb 04, 2021
0.9.25
Jan 29, 2021
0.9.24
Oct 16, 2020
0.9.23
Oct 08, 2020
0.9.22
Sep 16, 2020
0.9.21
Sep 02, 2020
0.9.20
Aug 26, 2020
0.9.19
Aug 09, 2020
0.9.18
May 05, 2020
0.9.17
Apr 08, 2020
0.9.16
Apr 07, 2020
0.9.15
Mar 19, 2020
0.9.14
Feb 28, 2020
0.9.13
Oct 15, 2019
0.9.12
Oct 06, 2019
0.9.11
Aug 25, 2019
0.9.10
Aug 09, 2019
0.9.9
Jul 19, 2019
0.9.8
Jul 08, 2019
0.9.7
Jun 28, 2019
0.9.6
Jun 10, 2019
0.9.5
May 31, 2019
0.9.4
May 22, 2019
0.9.3
May 14, 2019
0.9.2
May 14, 2019
0.9.1
May 11, 2019
0.9.0
May 09, 2019
0.8.12
Mar 11, 2019
0.8.11
Feb 27, 2019
0.8.10
Feb 07, 2019
0.8.9
Jan 31, 2019
0.8.8
Jan 04, 2019
0.8.7
Dec 28, 2018
0.8.6
Dec 21, 2018
0.8.5
Dec 14, 2018
0.8.4
Dec 07, 2018
0.8.3
Nov 07, 2018
0.8.2
Oct 31, 2018
0.8.1
Oct 18, 2018
0.8.0
Oct 10, 2018
0.7.10
Sep 26, 2018
0.7.9
Sep 18, 2018
0.7.8
Sep 11, 2018
0.7.7
Aug 30, 2018
0.7.6
Aug 21, 2018
0.7.5
Aug 16, 2018
0.7.4
Aug 15, 2018
0.7.3
Aug 07, 2018
0.7.2
Jul 30, 2018
0.7.1
Jul 23, 2018
0.7.0
Jul 16, 2018
0.6.10
Jul 11, 2018
0.6.9
Jul 06, 2018
0.6.8
Jun 29, 2018
0.6.7
Jun 15, 2018
0.6.6
Jun 06, 2018
0.6.5
May 28, 2018
0.6.4
May 17, 2018
0.6.3
May 04, 2018
0.6.2
Apr 24, 2018
0.6.1
Apr 14, 2018
0.6.0
Nov 23, 2017
0.5.12
Jun 10, 2017
0.5.10
May 25, 2017
0.5.9
Mar 15, 2017
0.5.8
Mar 08, 2017
0.5.7
Mar 01, 2017
0.5.6
Feb 22, 2017
0.5.5
Feb 15, 2017
0.5.4
Feb 08, 2017
0.5.3
Feb 01, 2017
0.5.2
Jan 05, 2017
0.5.1
Dec 21, 2016
0.5.0
Dec 20, 2016
0.4.7
Oct 02, 2016
0.4.6
Sep 01, 2016
0.4.5
Aug 17, 2016
0.4.4
Jul 21, 2016
0.4.3
Jun 30, 2016
0.4.2
Jun 26, 2016
0.4.1
Jun 24, 2016
0.4.0
Jun 24, 2016
0.3.4
Jun 08, 2016
0.3.3
Jun 06, 2016
0.3.2
May 30, 2016
0.3.1
May 28, 2016
0.3.0
May 20, 2016
0.2.7
Mar 20, 2016
0.2.6
Feb 07, 2016
0.2.5
Jan 22, 2016
0.2.4
Dec 30, 2015
0.2.3
Nov 07, 2015
0.2.2
Oct 12, 2015
0.2.1
Oct 12, 2015
0.2.0
Sep 13, 2015
0.1.6
May 29, 2015
0.1.5
Apr 09, 2015
0.1.4
Mar 30, 2015
0.1.3
Mar 23, 2015
0.1.2
Mar 15, 2015
0.1.1
Mar 11, 2015
0.1.0
Mar 09, 2015