OSX Guide

Installation

You can install xonsh using homebrew, conda, pip, or from source.

homebrew:

$ brew install xonsh

conda:

$ conda config --add channels conda-forge
$ conda install xonsh

pip:

$ pip3 install xonsh

source: Download the source from github (zip file), then run the following from the source directory,

$ python3 setup.py install

Extras for OSX

On Mac OSX, it is strongly recommended to install the gnureadline library if using the readline shell. gnureadline can be installed via pip:

$ pip3 install gnureadline

Xonsh has support for using bash completion files on the shell, to use it you need to install the bash-completion package

$ brew install bash-completion

Additional Setup

If you want to use xonsh as your default shell, you will first have to add xonsh to /etc/shells.

First ensure that xonsh is on your $PATH

$ which xonsh

Then, as root, add xonsh to the shell list

# which xonsh >> /etc/shells

To change shells, run

$ chsh -s $(which xonsh)

You will have to log out and log back in before the changes take effect.

Dependencies

Xonsh currently has the following external dependencies,

Run Time:

  1. Python v3.4+
  2. PLY (optional, included with xonsh)

Pip supports “extra” dependendcies in the form of xonsh[ptk,linux], where the list in the brackets identify the optional featues

Xonsh currently has the following extras

  1. ptk: prompt-toolkit, pygments: advanced readline library, syntax-highlighting, line-editing
  2. proctitle: setproctitle: change the title of terminal to reflect the current subprocess
  3. linux: distro: linux specific platform information
  4. mac: gnureadline: GNU’s featureful version of readline
  5. win: win_unicode_console: enables the use of Unicode in windows consoles

In addition, xonsh integrates with Jupyter, an in-browser REPL, enabling the use of xonsh in jupyter notebooks

Development Dependencies

If you want to develop xonsh, it is extremely recommended to install the depdencies listed in requirements-docs.txt (to generate documentation) and requirements-tests.txt (to run the test suite).