An open API service indexing awesome lists of open source software.

https://github.com/xonsh/xonsh

:shell: Python-powered shell. Full-featured and cross-platform.
https://github.com/xonsh/xonsh

artificial-intelligence bash cli command-line console data-engineering data-science devops fish iterm2 python raspberry-pi security-automation shell xonsh zsh

Last synced: 26 days ago
JSON representation

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

Awesome Lists containing this project

README

          

xonsh
=====

.. raw:: html

Xonsh shell icon.

**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 "consh" - a softer form of the word "conch" (🐚, ``@``), referring to the world of command shells.

.. raw:: html


.. 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('root')

xontrib load dalias # plugin
$(@json docker 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)

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

We're refactoring the docs about xonsh installation so you can try the new way:

* Install xonsh using `xonsh-install `_
* `Draft "Xonsh Installation General Guide" `_

The old way is to install xonsh from pip:

.. code-block:: shell

python -m pip install 'xonsh[full]'

Visit https://xon.sh for more information:

- `Installation `_ - using `xonsh-install `_, packages, docker or AppImage.
- `Tutorial `_ - step by step introduction in xonsh.

Some beginners find the `xonsh cheatsheet `_ a helpful place to start.

Extensions
**********

Xonsh has an extension/plugin system. We call these additions ``xontribs``.

- `Xontribs on Github `_
- `Awesome xontribs `_
- `Core xontribs `_
- `Create a xontrib step by step from template `_

Projects that use xonsh or compatible
*************************************

- `conda `_ and `mamba `_: Modern package managers.
- `Starship `_: Cross-shell prompt.
- `zoxide `_: A smarter cd command.
- `gitsome `_: Supercharged Git/shell autocompleter with GitHub integration.
- `xxh `_: Using xonsh wherever you go through the SSH.
- `Snakemake `_: A workflow management system to create reproducible and scalable data analyses.
- `any-nix-shell `_: xonsh support for the ``nix run`` and ``nix-shell`` environments of the Nix package manager.
- `lix `_: A modern, delicious implementation of the Nix package manager.
- `x-cmd `_: x-cmd is a vast and interesting collection of tools guided by the Unix philosophy.
- `rever `_: Cross-platform software release tool.
- `Regro autotick bot `_: Regro Conda-Forge autoticker.

Jupyter-based interactive notebooks via `xontrib-jupyter `_:

- `Jupyter and JupyterLab `_: Interactive notebook platform.
- `euporie `_: Terminal based interactive computing environment.
- `Jupytext `_: Clear and meaningful diffs when doing Jupyter notebooks version control.

Compile, packaging or accelerate xonsh:

- `AppImage `_ is a format for distributing Linux applications and can be used to `create a standalone xonsh package `_.
- `Nuitka `_ is an optimizing Python compiler that can `build a native xonsh binary `_.
- `RustPython `_ is a Python interpreter written in Rust that can `run xonsh on top of Rust `_.

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 `_ or `high priority issue `_ or a `good first issue `_. You can start with the `Developer guide `_. Feel free to use LLM e.g. `Github Copilot `_.
- Take an `idea `_ and `create a new xontrib `_.
- Contribute to `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 `_, `terminal emulator `_, `console tool `_, `IDE `_.
- Test xonsh with compiler, interpreter, optimizer and report upstream issues (e.g. `Nuitka `_, `RustPython `_).
- Design more `logos and images `_, improve `xonsh website `_ (`src `_).
- `Become a sponsor to xonsh `_.
- Spread the good word about xonsh in the world by sharing news and notes about xonsh.
- Give a star to xonsh repository and to `xontribs `_ you like.

We welcome new contributors!

Credits
*******

- Thanks to `Zulip `_ for supporting the `xonsh community `_!
- Thanks to ADS.FUND for supporting `xonsh token `_!