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, 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')
xontrib load dalias # extension
$(@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:
- 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.
- 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>`_.
- 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>`_.
- 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!
Credits
*******
- Thanks to `Zulip <https://zulip.com/>`_ for supporting the `xonsh community <https://xonsh.zulipchat.com/>`_!
- Thanks to ADS.FUND for supporting `xonsh token <https://ads.fund/token/0xadf7478450b69a349ed9634b18584d2d3da81464>`_!
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
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xonsh-0.22.3.tar.gz.
File metadata
- Download URL: xonsh-0.22.3.tar.gz
- Upload date:
- Size: 826.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67468d9689cdfc88c90b3530c696b70f540959216968c016bea3645343134069
|
|
| MD5 |
d75090fd7fa0e69266f87877dfec0348
|
|
| BLAKE2b-256 |
874bc18878e91e54ae92df558c0af2928d32a0c0259f2f3032fa80b0fb6be59b
|
Provenance
The following attestation bundles were made for xonsh-0.22.3.tar.gz:
Publisher:
publish.yml on xonsh/xonsh
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xonsh-0.22.3.tar.gz -
Subject digest:
67468d9689cdfc88c90b3530c696b70f540959216968c016bea3645343134069 - Sigstore transparency entry: 911155382
- Sigstore integration time:
-
Permalink:
xonsh/xonsh@b446946fd94c3913e002318db1d1b41ee4fa1f9a -
Branch / Tag:
refs/tags/0.22.3 - Owner: https://github.com/xonsh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b446946fd94c3913e002318db1d1b41ee4fa1f9a -
Trigger Event:
release
-
Statement type:
File details
Details for the file xonsh-0.22.3-py313-none-any.whl.
File metadata
- Download URL: xonsh-0.22.3-py313-none-any.whl
- Upload date:
- Size: 654.7 kB
- Tags: Python 3.13
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63d989a7d59d5600a4c1f38b09719f19aaa47e673b428db55a6cabe0d2300fe7
|
|
| MD5 |
21851ddc50f234393bc3f5439452e534
|
|
| BLAKE2b-256 |
86e5840e563a7ddaeca737667b0d8bbbb22356ba65be009d12a6edc31f170719
|
Provenance
The following attestation bundles were made for xonsh-0.22.3-py313-none-any.whl:
Publisher:
publish.yml on xonsh/xonsh
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xonsh-0.22.3-py313-none-any.whl -
Subject digest:
63d989a7d59d5600a4c1f38b09719f19aaa47e673b428db55a6cabe0d2300fe7 - Sigstore transparency entry: 911154866
- Sigstore integration time:
-
Permalink:
xonsh/xonsh@b446946fd94c3913e002318db1d1b41ee4fa1f9a -
Branch / Tag:
refs/tags/0.22.3 - Owner: https://github.com/xonsh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b446946fd94c3913e002318db1d1b41ee4fa1f9a -
Trigger Event:
release
-
Statement type:
File details
Details for the file xonsh-0.22.3-py312-none-any.whl.
File metadata
- Download URL: xonsh-0.22.3-py312-none-any.whl
- Upload date:
- Size: 654.3 kB
- Tags: Python 3.12
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8efcd0aaaf0040c5e843884a067c036edf562a618fcd5c71d0ee9ff8caff5037
|
|
| MD5 |
aca307e6bc6017bfc8a851c995937c2a
|
|
| BLAKE2b-256 |
493ba30a0901671c2ff2aa2bee4968887d76212c091b3d58f938ebc8f8f287bc
|
Provenance
The following attestation bundles were made for xonsh-0.22.3-py312-none-any.whl:
Publisher:
publish.yml on xonsh/xonsh
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xonsh-0.22.3-py312-none-any.whl -
Subject digest:
8efcd0aaaf0040c5e843884a067c036edf562a618fcd5c71d0ee9ff8caff5037 - Sigstore transparency entry: 911154738
- Sigstore integration time:
-
Permalink:
xonsh/xonsh@b446946fd94c3913e002318db1d1b41ee4fa1f9a -
Branch / Tag:
refs/tags/0.22.3 - Owner: https://github.com/xonsh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b446946fd94c3913e002318db1d1b41ee4fa1f9a -
Trigger Event:
release
-
Statement type:
File details
Details for the file xonsh-0.22.3-py311-none-any.whl.
File metadata
- Download URL: xonsh-0.22.3-py311-none-any.whl
- Upload date:
- Size: 654.2 kB
- Tags: Python 3.11
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bdbabb060163a6a0067b13dd47775af8191c7241c3950b210a42f0c8112d7eb
|
|
| MD5 |
1f1f3d373dd881dd0eea3597ab161d68
|
|
| BLAKE2b-256 |
c9d67b5893b17855f934dbf8849741d8f8040db2ceeb3a34486565c5da9764ac
|
Provenance
The following attestation bundles were made for xonsh-0.22.3-py311-none-any.whl:
Publisher:
publish.yml on xonsh/xonsh
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xonsh-0.22.3-py311-none-any.whl -
Subject digest:
0bdbabb060163a6a0067b13dd47775af8191c7241c3950b210a42f0c8112d7eb - Sigstore transparency entry: 911155409
- Sigstore integration time:
-
Permalink:
xonsh/xonsh@b446946fd94c3913e002318db1d1b41ee4fa1f9a -
Branch / Tag:
refs/tags/0.22.3 - Owner: https://github.com/xonsh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b446946fd94c3913e002318db1d1b41ee4fa1f9a -
Trigger Event:
release
-
Statement type: