Skip to main content

Python-powered shell. Full-featured and cross-platform.

Project description

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 and cross-platform. The language is a superset of Python 3.6+ with additional shell primitives. The name Xonsh should be pronounced like conch (🐚, ``@``) and signifies belonging 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)

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/
: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:: shell

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

Welcome to 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.
- Implement and maintain xonsh support in third party tools e.g. conda, jupyter, zoxide, etc.
- Design more `logos and images <https://github.com/anki-code/xonsh-logo>`_, improve `xonsh website <https://xon.sh/>`_.
- `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 <https://xonsh.zulipchat.com/>`_!

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xonsh-0.19.9.tar.gz (730.5 kB view details)

Uploaded Source

Built Distributions

xonsh-0.19.9-py313-none-any.whl (645.6 kB view details)

Uploaded Python 3.13

xonsh-0.19.9-py312-none-any.whl (645.1 kB view details)

Uploaded Python 3.12

xonsh-0.19.9-py311-none-any.whl (645.1 kB view details)

Uploaded Python 3.11

xonsh-0.19.9-py310-none-any.whl (645.1 kB view details)

Uploaded Python 3.10

xonsh-0.19.9-py39-none-any.whl (637.4 kB view details)

Uploaded Python 3.9

File details

Details for the file xonsh-0.19.9.tar.gz.

File metadata

  • Download URL: xonsh-0.19.9.tar.gz
  • Upload date:
  • Size: 730.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for xonsh-0.19.9.tar.gz
Algorithm Hash digest
SHA256 4cab4c4d7a98aab7477a296f12bc008beccf3d090c6944f0b3375d80a574c37d
MD5 da80401f2a08f12f272eae03269a2ac6
BLAKE2b-256 eaeb8f544caca583c5f9f0ae7d852769fdb8ed5f63b67646a3c66a2d19357d56

See more details on using hashes here.

Provenance

The following attestation bundles were made for xonsh-0.19.9.tar.gz:

Publisher: publish.yml on xonsh/xonsh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xonsh-0.19.9-py313-none-any.whl.

File metadata

  • Download URL: xonsh-0.19.9-py313-none-any.whl
  • Upload date:
  • Size: 645.6 kB
  • Tags: Python 3.13
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for xonsh-0.19.9-py313-none-any.whl
Algorithm Hash digest
SHA256 fa2b5f200413e92524b17da0bd6db08378e0ded12bbe81335bc94a03ea9fc670
MD5 3fc09cfd0b15062b09c243d03e339e37
BLAKE2b-256 ca8d45f9bf28a54504cfca126ac13d7f04a564ac7c8559163f8ecbc73e87f0f2

See more details on using hashes here.

Provenance

The following attestation bundles were made for xonsh-0.19.9-py313-none-any.whl:

Publisher: publish.yml on xonsh/xonsh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xonsh-0.19.9-py312-none-any.whl.

File metadata

  • Download URL: xonsh-0.19.9-py312-none-any.whl
  • Upload date:
  • Size: 645.1 kB
  • Tags: Python 3.12
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for xonsh-0.19.9-py312-none-any.whl
Algorithm Hash digest
SHA256 ce0b91b8b25da835c0ffdb3f4aa4cf412ec5481f59a33ce9230cfa5fcbb5b0c8
MD5 88e639771fa219ab5334f0cf95eb99e2
BLAKE2b-256 0bb6a10c0c11eb2ed9edef4081feb588b1e16d8f9c752a288150163700c876cd

See more details on using hashes here.

Provenance

The following attestation bundles were made for xonsh-0.19.9-py312-none-any.whl:

Publisher: publish.yml on xonsh/xonsh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xonsh-0.19.9-py311-none-any.whl.

File metadata

  • Download URL: xonsh-0.19.9-py311-none-any.whl
  • Upload date:
  • Size: 645.1 kB
  • Tags: Python 3.11
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for xonsh-0.19.9-py311-none-any.whl
Algorithm Hash digest
SHA256 3c872d6f2f109ad3345af4476d2541a71d6ccdbbf2404b2fb2b95755c54e73ab
MD5 9537e1788906b6e8c72e38709ea5a5ee
BLAKE2b-256 a068464a07569e8f973339a83d95eda980b60db4dbbe2da8ee82874081f9432c

See more details on using hashes here.

Provenance

The following attestation bundles were made for xonsh-0.19.9-py311-none-any.whl:

Publisher: publish.yml on xonsh/xonsh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xonsh-0.19.9-py310-none-any.whl.

File metadata

  • Download URL: xonsh-0.19.9-py310-none-any.whl
  • Upload date:
  • Size: 645.1 kB
  • Tags: Python 3.10
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for xonsh-0.19.9-py310-none-any.whl
Algorithm Hash digest
SHA256 8974981f04740b35a6f283aefe8e50b72b00e83cf4a871d6cc04500c0e3be2dd
MD5 67f2375f7528dad3f6ba3401b62f0404
BLAKE2b-256 72ce429bfed55803d7469fe3d0d02c385bc61eddfa7ace539b4fc0060fd8282d

See more details on using hashes here.

Provenance

The following attestation bundles were made for xonsh-0.19.9-py310-none-any.whl:

Publisher: publish.yml on xonsh/xonsh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file xonsh-0.19.9-py39-none-any.whl.

File metadata

  • Download URL: xonsh-0.19.9-py39-none-any.whl
  • Upload date:
  • Size: 637.4 kB
  • Tags: Python 3.9
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for xonsh-0.19.9-py39-none-any.whl
Algorithm Hash digest
SHA256 b136f62f444483de2a83a8005c3e5e4fb1005a1625a4e51a2d35f0a717a7ac6f
MD5 c5244ec3b273c5ace491f753db52a028
BLAKE2b-256 542afd19683e948aaa9fbcd217056417f8b7fdf972ead1b5820cbfe4f28ef93b

See more details on using hashes here.

Provenance

The following attestation bundles were made for xonsh-0.19.9-py39-none-any.whl:

Publisher: publish.yml on xonsh/xonsh

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page