🐚 Python-powered shell. Full-featured and cross-platform.
Find a file
Gil Forsyth f2e4c93785 test(ubuntu,osx): skip pipeline and specs tests on Python 3.12
Some combination of these tests is hanging CI, but so far isn't
reproducible locally.  Need to narrow it down, but this is to unblock
other work.

test(ubuntu): skip all pipeline tests on Ubuntu on Python 3.12

test(specs): skip specs tests instead

test(pipelines): actually skip the pipeline tests

test: skip jobs

test: skip specs

test: only skip specs

test: skip specs and pipelines
2024-11-16 12:59:35 -05:00
.devcontainer Codespaces and devcontainer.json (#5158) 2023-06-21 22:23:46 +05:30
.github Update test.yml (#5666) 2024-08-14 18:28:56 +05:30
appimage Update AppImage README.rst (#5523) 2024-06-21 10:33:21 +02:00
ci fix: xonfig web is not upto-date (#4606) 2022-01-18 11:11:16 -05:00
docs Add examples of environment variable interpolation (#5714) 2024-10-31 10:33:45 +01:00
news Updated CHANGELOG for 0.18.4 2024-11-02 17:46:42 -04:00
scripts re-run CI tests 2020-08-08 14:02:44 -04:00
tests test(ubuntu,osx): skip pipeline and specs tests on Python 3.12 2024-11-16 12:59:35 -05:00
xompletions feat: add xontrib-django 2022-04-12 14:19:15 +05:30
xonsh test(ubuntu,osx): skip pipeline and specs tests on Python 3.12 2024-11-16 12:59:35 -05:00
xontrib [pre-commit.ci] pre-commit autoupdate (#5271) 2024-01-30 12:23:50 +01:00
.authors.yml Updated authorship for 0.18.4 2024-11-02 17:46:42 -04:00
.coveragerc use faster coverage (#5657) 2024-08-09 15:49:36 +05:30
.gitattributes refactoring: move tests to component dirs: lib, procs (#5558) 2024-06-29 11:23:16 +02:00
.gitignore chore: use stable 3.12 for CI jobs (#5307) 2024-05-16 15:43:57 +05:30
.mailmap Updated authorship for 0.18.4 2024-11-02 17:46:42 -04:00
.pre-commit-config.yaml [pre-commit.ci] pre-commit autoupdate (#5694) 2024-10-07 22:40:38 +02:00
AUTHORS.rst Updated authorship for 0.18.4 2024-11-02 17:46:42 -04:00
CHANGELOG.rst Updated CHANGELOG for 0.18.4 2024-11-02 17:46:42 -04:00
conftest.py use recommended pytest entry point in docs and comments (#4671) 2022-02-19 01:45:45 +05:30
CONTRIBUTING.rst fix knight vs snail! 2024-06-14 22:26:02 +02:00
FUNDING.yml Become a sponsor to xonsh (#5167) 2023-07-01 13:15:06 +00:00
github_deploy_key.enc publish dev and latest release docs on xonsh-docs 2016-10-20 19:48:38 -04:00
license copyright update 2016-06-30 12:24:55 -04:00
logo.txt Update logo.txt: fix char to @ 2024-07-07 18:56:49 +02:00
MANIFEST.in refactor(amalgamate): remove amalgamation (#4858) 2022-07-04 10:40:16 +05:30
pyproject.toml chore(metadata): swap in shorter email address (#5604) 2024-07-17 10:43:08 -04:00
README.rst Update README.rst 2024-09-24 13:38:32 +02:00
rever.xsh Downgrade AppImage to 3.11 (#5364) 2024-04-25 11:46:36 +02:00
run-tests.xsh use faster coverage (#5657) 2024-08-09 15:49:36 +05:30
setup.cfg refactoring: move parsers (#5552) 2024-06-29 13:58:02 +05:30
setup.py refactoring: restore parser to backwards compatibility after refactoring (#5571) 2024-07-03 10:33:17 +02:00
xonsh-in-docker.py bump xonsh-in-docker version 2024-06-30 00:28:31 +02:00

xonsh
=====

.. class:: center

    **xonsh** is a Python-powered shell. Full-featured and cross-platform. The language is a superset of Python 3.6+ with additional shell primitives.  Xonsh word was made from *conch* (🐚, *@*) and indicates belonging to the command shells world.


.. list-table::
   :widths: 1 1

   *  -  **Xonsh is the Shell**
      -  **Xonsh is Python**

   *  -  .. code-block:: shell

            cd $HOME

            id $(whoami)

            cat /etc/passwd | grep root > ~/root.txt

            $PROMPT = '@ '


      -  .. code-block:: python

            2 + 2

            var = "hello".upper()

            import json; 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('root')

            xontrib load dalias
            id = $(@json docker ps --format json)['ID']

      -  .. code-block:: python

            name = 'foo' + 'bar'.upper()
            echo @(name) > /tmp/@(name)

            ls @(input('file: '))
            touch @([f"file{i}" for i in range(0,10)])

            aliases['e'] = 'echo @(2+2)'
            aliases['a'] = lambda args: print(args)


If you like xonsh, :star: the repo, `write a tweet`_ and stay tuned by watching releases.

.. class:: center

    .. image:: https://img.shields.io/badge/Zulip%20Community-xonsh-green
            :target: https://xonsh.zulipchat.com/join/hbvue5rimpdkwkdjuiqfs7tv/
            :alt: Join to xonsh.zulipchat.com

    .. 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

    .. image:: https://repology.org/badge/tiny-repos/xonsh.svg
            :target: https://repology.org/project/xonsh/versions
            :alt: repology.org


First steps
***********

Install xonsh from pip:

.. code-block:: xonshcon

    python -m pip install 'xonsh[full]'

And visit https://xon.sh for more information:

- `Installation <https://xon.sh/contents.html#installation>`_ - using packages, docker or AppImage.
- `Tutorial <https://xon.sh/tutorial.html>`_ - step by step introduction in xonsh.

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.
- `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.

The xonsh shell community
*************************

The xonsh shell is developed by a community of volunteers. There are a few ways to help out:

- 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>`_.
- 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.
- `Become a sponsor to xonsh <https://github.com/sponsors/xonsh>`_.
- `Write a tweet`_, post or an article to spread the good word about xonsh in the world.
- Give a star to xonsh repository and to `xontribs <https://github.com/topics/xontrib>`_ you like.

We welcome new contributors!

.. _write a tweet: https://twitter.com/intent/tweet?text=xonsh%20is%20a%20Python-powered,%20cross-platform,%20Unix-gazing%20shell%20language%20and%20command%20prompt.&url=https://github.com/xonsh/xonsh

Credits
*******

- Thanks to `Zulip <https://zulip.com/>`_ for supporting the xonsh community!