## XONSH is a Python-powered shell

Xonsh (sounds like "consh") is a modern, full-featured and cross-platform python shell. The language is a superset of Python 3.6+ with additional shell primitives that you are used to from Bash and IPython. It works on all major systems including Linux, OSX, and Windows. Xonsh is meant for the daily use of experts and novices.

Install Docs Github Sponsor

## What is Xonsh?

The xonsh as a python shell lets you easily mix Python and shell commands in a powerful and simplified approach to the command line.

### Xonsh is the Shell

The xonsh language provides the shell primitives commonly found in traditional Unix shells, including interaction with standard utilities, pipelines, and input/output streams. Read more →

    cd $HOME

    cat /etc/passwd | grep root

    ls -la

### Xonsh is Python

The xonsh language is a superset of Python 3.6+, allowing you to execute Python code directly, install and use third-party libraries, import modules, and take advantage of the broader Python ecosystem and tooling. Read more →

    2 + 2

    import json
    j = json.loads('{"Hello": "world!", "Answer": 42}')
    print(j['Answer'])

### Xonsh is the Shell in Python

Xonsh provides a unified environment where shell functionality and Python code work together naturally. Read more →

    len($(curl -L https://xon.sh))

    for filename in `.*`:
        print(filename)
        du -sh @(filename)

### Xonsh is Python in the Shell

Xonsh shell session builtins allow xonsh to function as a fully featured shell, tightly integrated with the operating system and its environment. Read more →

    var = 'he' + 'llo'

    echo @(var) > /tmp/@(var)

    echo @(i for i in range(42))

## Xonsh Features

Xonsh is a super-charged shell that enables you to work quickly and effectively! Some of the features that help set xonsh apart are:

#### Combine shell commands with Python or vice versa.

The language is a superset of Python 3.6+ with additional shell primitives that you are used to from Bash and IPython.

#### Xontribs - the 3rd-party extension system.

Xontributions, or xontribs, are a set of tools and conventions for extending the functionality of xonsh.

#### Rich interface to discover history

The xonsh shell creates history files with rich structure and metadata and an API for interacting with them.

#### Powerful prompt customisation

Customisable tab completion, key bindings, color styles are on board by default.

## Xontribs

Xontributions, or xontribs, are a set of tools and conventions for extending the functionality of xonsh.

pipeliner

Let your pipe lines from the standard output flow thru the Python code in the xonsh shell.

output-search

Get identifiers, paths, URLs and words from the previous command output and use them for the next command in the xonsh shell.

back2dir

Return to the most recently used directory when starting the xonsh shell.

argcomplete

Argcomplete support to tab completion of python and xonsh scripts in the xonsh shell.

More xontribs →

## Talks about xonsh

Some interesting publications around xonsh.

25 Aug, 2020

### Xonsh in TOP10 trending projects

We're listing down the top 10 trending open-source projects In Python on GitHub and the xonsh shell is one of these projects.

11 Jul, 2019

### Xonsh on Scipy 2019 conference

A. Scopatz and G. Forsyth gave a two hour presentation of xonsh.

01 Jun, 2016

### Xonsh on PyCon 2016

The first big presentation of Xonsh from Anthony Scopatz!