Xontribs

The following lists known xonsh contributions (xontribs), a description of the xontrib, and how to get your hands on it. Once installed, these xontribs can be loaded into your session by adding them to your xonshrc file or on the command line using the xontrib command:

>>> xontrib mpl xo ...

abbrevs

apt_tabcomplete

argcomplete

autojump

autovox

autoxsh

avox

avox_poetry

back2dir

base16_shell

bashisms

broot

cd

cmd_done

commands

coreutils

direnv

distributed

docker_tabcomplete

free_cwd

fzf-widgets

gitinfo

hist_navigator

histcpy

history_encrypt

jedi

kitty

mpl

onepath

output_search

pdb

pipeliner

powerline

powerline2

powerline3

powerline_binding

prompt_bar

prompt_ret_code

prompt_vi_mode

pyenv

readable-traceback

schedule

scrapy_tabcomplete

sh

ssh_agent

tcg

vox

vox_tabcomplete

whole_word_jumping

xo

xog

xpg

z

zoxide

Information

abbrevs

Website

http://xon.sh

Package

xonsh website, BSD 3-clause

Command abbreviations.

This expands input words from abbrevs disctionary as you type. Adds abbrevs dictionary to hold user-defined “command abbreviations. The dictionary is searched as you type the matching words are replaced at the command line by the corresponding dictionary contents once you hit ‘Space’ or ‘Return’ key.

For instance a frequently used command such as git status can be abbreviated to gst as follows:

$ xontrib load abbrevs
$ abbrevs['gst'] = 'git status'
$ gst # Once you hit <space> or <return> 'gst' gets expanded to 'git status'.

one can set a callback function that receives current buffer and word to customize the expanded word based on context

$ abbrevs['ps'] = lambda buffer, word: "procs" if buffer.text.startswith(word) else word

It is also possible to set the cursor position after expansion with,

$ abbrevs[‘gp’] = “git push <edit> –force”

This xontrib is preinstalled with xonsh.

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load abbrevs

apt_tabcomplete

Website

https://github.com/DangerOnTheRanger/xonsh-apt-tabcomplete

Package

xonsh-apt-tabcomplete website, BSD 2-clause

Adds tabcomplete functionality to apt-get/apt-cache inside of xonsh.

Installation:

# install with pip
xpip install xonsh-apt-tabcomplete

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load apt_tabcomplete

argcomplete

Website

https://github.com/anki-code/xontrib-argcomplete

Package

xontrib-argcomplete website, BSD

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

Installation:

# install with pip
xpip install xontrib-argcomplete

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load argcomplete

autojump

Website

https://github.com/wshanks/xontrib-autojump

Package

unknown

autojump support for xonsh


autovox

Website

http://xon.sh

Package

xonsh website, BSD 3-clause

Manages automatic activation of virtual environments.

This xontrib is preinstalled with xonsh.

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load autovox

autoxsh

Website

https://github.com/Granitas/xonsh-autoxsh

Package

xonsh-autoxsh website, GPLv3

Adds automatic execution of xonsh script files called .autoxsh when enterting a directory with cd function

Installation:

# install with pip
xpip install xonsh-autoxsh

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load autoxsh

avox

Website

https://github.com/AstraLuma/xontrib-avox

Package

xontrib-avox website, GPLv3

Policy for autovox based on project directories

Installation:

# install with pip
xpip install xontrib-avox

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load avox

avox_poetry

Website

github.com/jnoortheen/xontrib-avox-poetry

Package

xontrib-avox-poetry website, MIT

auto-activate venv as one cd into a poetry project folder. Activate .venv inside the project folder is also supported.

Installation:

# install with pip
xpip install xontrib-avox-poetry

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load avox_poetry

back2dir

Website

https://github.com/anki-code/xontrib-back2dir

Package

xontrib-back2dir website, BSD

Return to the most recently used directory when starting the xonsh shell. For example, if you were in the ‘/work’ directory when you last exited xonsh, then your next xonsh session will start in the ‘/work’ directory, instead of your home directory.

Installation:

# install with pip
xpip install xontrib-back2dir

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load back2dir

base16_shell

Website

https://github.com/ErickTucto/xontrib-base16-shell

Package

unknown

Change base16 shell themes


bashisms

Website

http://xon.sh

Package

xonsh website, BSD 3-clause

Enables additional Bash-like syntax while at the command prompt. For example, the !! syntax for running the previous command is now usable. Note that these features are implemented as precommand events and these additions do not affect the xonsh language when run as script. That said, you might find them useful if you have strong muscle memory.

Warning: This xontrib may modify user command line input to implement its behavior. To see the modifications as they are applied (in unified diffformat), please set $XONSH_DEBUG to 2 or higher.

The xontrib also adds commands: alias, export, unset, set, shopt, complete.

This xontrib is preinstalled with xonsh.

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load bashisms

broot

Website

github.com/jnoortheen/xontrib-broot

Package

xontrib-broot website, MIT

supports broot with br alias

Installation:

# install with pip
xpip install xontrib-broot

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load broot

cd

Website

https://github.com/eugenesvk/xontrib-cd

Package

xontrib-cd website, MIT

‘cd’ to any path without escaping in xonsh shell (‘cd ‘→’cd! ‘)

Installation:

# install with pip
xpip install xontrib-cd

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load cd

cmd_done

Website

https://github.com/jnoortheen/xontrib-cmd-durations

Package

xontrib-cmd-durations website, MIT

send notification once long-running command is finished. Adds long_cmd_duration field to $PROMPT_FIELDS. Note: It needs xdotool installed to detect current window.

Installation:

# install with pip
xpip install xontrib-cmd-durations

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load cmd_done

commands

Website

https://github.com/jnoortheen/xontrib-commands

Package

xontrib-commands website, MIT

Some useful commands/aliases to use with Xonsh shell

Installation:

# install with pip
xpip install xontrib-commands

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load commands

coreutils

Website

http://xon.sh

Package

xonsh website, BSD 3-clause

Additional core utilities that are implemented in xonsh. The current list includes:

  • cat

  • echo

  • pwd

  • tee

  • tty

  • yes

In many cases, these may have a lower performance overhead than the posix command line utility with the same name. This is because these tools avoid the need for a full subprocess call. Additionally, these tools are cross-platform.

This xontrib is preinstalled with xonsh.

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load coreutils

direnv

Website

https://github.com/74th/xonsh-direnv

Package

xonsh-direnv website, MIT

Supports direnv.

Installation:

# install with pip
xpip install xonsh-direnv

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load direnv

distributed

Website

http://xon.sh

Package

xonsh website, BSD 3-clause

The distributed parallel computing library hooks for xonsh. Importantly this provides a substitute ‘dworker’ command which enables distributed workers to have access to xonsh builtins.

Furthermore, this xontrib adds a ‘DSubmitter’ context manager for executing a block remotely. Moreover, this also adds a convenience function ‘dsubmit()’ for creating DSubmitter and Executor instances at the same time. Thus users may submit distributed jobs with:

with dsubmit('127.0.0.1:8786', rtn='x') as dsub:
    x = $(echo I am elsewhere)

res = dsub.future.result()
print(res)

This is useful for long running or non-blocking jobs.

This xontrib is preinstalled with xonsh.

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load distributed

docker_tabcomplete

Website

https://github.com/xsteadfastx/xonsh-docker-tabcomplete

Package

xonsh-docker-tabcomplete website, MIT

Adds tabcomplete functionality to docker inside of xonsh.

Installation:

# install with pip
xpip install xonsh-docker-tabcomplete

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load docker_tabcomplete

free_cwd

Website

http://xon.sh

Package

xonsh website, BSD 3-clause

Windows only xontrib, to release the lock on the current directory whenever the prompt is shown. Enabling this will allow the other programs or Windows Explorer to delete or rename the current or parent directories. Internally, it is accomplished by temporarily resetting CWD to the root drive folder while waiting at the prompt. This only works with the prompt_toolkit backend and can cause cause issues if any extensions are enabled that hook the prompt and relies on os.getcwd()

This xontrib is preinstalled with xonsh.

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load free_cwd

fzf-widgets

Website

https://github.com/laloch/xontrib-fzf-widgets

Package

xontrib-fzf-widgets website, GPLv3

Adds some fzf widgets to your xonsh shell.

Installation:

# install with pip
xpip install xontrib-fzf-widgets

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load fzf-widgets

gitinfo

Website

https://github.com/dyuri/xontrib-gitinfo

Package

xontrib-gitinfo website, MIT

Displays git information on entering a repository folder. Uses onefetch if available.

Installation:

# install with pip
xpip install xontrib-gitinfo

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load gitinfo

hist_navigator

Website

https://github.com/jnoortheen/xontrib-hist-navigator

Package

xontrib-hist-navigator website, MIT

Move through directory history with nextd and prevd also with keybindings.

Installation:

# install with pip
xpip install xontrib-hist-navigator

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load hist_navigator

histcpy

Website

https://github.com/con-f-use/xontrib-histcpy

Package

xontrib-histcpy website, GPLv3

Useful aliases and shortcuts for extracting links and textfrom command output history and putting them into the clipboard.

Installation:

# install with pip
xpip install xontrib-histcpy

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load histcpy

history_encrypt

Website

https://github.com/anki-code/xontrib-history-encrypt

Package

xontrib-history-encrypt website, MIT

History backend that encrypt the xonsh shell commands history to prevent leaking sensitive data.

Installation:

# install with pip
xpip install xontrib-history-encrypt

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load history_encrypt

jedi

Website

http://xon.sh

Package

xonsh website, BSD 3-clause

Use Jedi as xonsh’s python completer.

This xontrib is preinstalled with xonsh.

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load jedi

kitty

Website

https://github.com/scopatz/xontrib-kitty

Package

xontrib-kitty website, BSD-3-Clause

Xonsh hooks for the Kitty terminal emulator.

Installation:

# install with conda
conda install -c conda-forge xontrib-kitty    # install with pip
xpip install xontrib-kitty

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load kitty

mpl

Website

http://xon.sh

Package

xonsh website, BSD 3-clause

Matplotlib hooks for xonsh, including the new ‘mpl’ alias that displays the current figure on the screen.

This xontrib is preinstalled with xonsh.

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load mpl

onepath

Website

https://github.com/anki-code/xontrib-onepath

Package

xontrib-onepath website, BSD

When you click to a file or folder in graphical OS they will be opened in associated app.The xontrib-onepath brings the same logic for the xonsh shell. Type the filename or pathwithout preceding command and an associated action will be executed. The actions are customizable.

Installation:

# install with pip
xpip install xontrib-onepath

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load onepath

pdb

Website

http://xon.sh

Package

xonsh website, BSD 3-clause

Simple built-in debugger. Runs pdb on reception of SIGUSR1 signal.

This xontrib is preinstalled with xonsh.

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load pdb

pipeliner

Website

https://github.com/anki-code/xontrib-pipeliner

Package

xontrib-pipeliner website, MIT

Let your pipe lines flow thru the Python code in xonsh.

Installation:

# install with pip
xpip install xontrib-pipeliner

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load pipeliner

powerline

Website

https://github.com/santagada/xontrib-powerline

Package

xontrib-powerline website, MIT

Powerline for Xonsh shell

Installation:

# install with pip
xpip install xontrib-powerline

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load powerline

powerline2

Website

https://github.com/vaaaaanquish/xontrib-powerline2

Package

xontrib-powerline2 website, MIT

Powerline for Xonsh shell forked from santagada/xontrib-powerline

Installation:

# install with pip
xpip install xontrib-powerline2

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load powerline2

powerline3

Website

github.com/jnoortheen/xontrib-powerline3

Package

xontrib-powerline3 website, MIT

Powerline theme with native $PROMPT_FIELDS support.

Installation:

# install with pip
xpip install xontrib-powerline3

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load powerline3

powerline_binding

Website

https://github.com/dyuri/xontrib-powerline-binding

Package

xontrib-powerline-binding website, MIT

Uses powerline to render the xonsh prompt

Installation:

# install with pip
xpip install xontrib-powerline-binding

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load powerline_binding

prompt_bar

Website

https://github.com/anki-code/xontrib-prompt-bar

Package

xontrib-prompt-bar website, MIT

An elegance bar style for prompt.

Installation:

# install with pip
xpip install xontrib-prompt-bar

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load prompt_bar

prompt_ret_code

Website

http://xon.sh

Package

xonsh website, BSD 3-clause

Adds return code info to the prompt

This xontrib is preinstalled with xonsh.

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load prompt_ret_code

prompt_vi_mode

Website

https://github.com/t184256/xontrib-prompt-vi-mode

Package

xontrib-prompt-vi-mode website, MIT

vi-mode status formatter for xonsh prompt

Installation:

# install with pip
xpip install xontrib-prompt-vi-mode

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load prompt_vi_mode

pyenv

Website

https://github.com/dyuri/xontrib-pyenv

Package

xontrib-pyenv website, MIT

pyenv integration for xonsh.

Installation:

# install with pip
xpip install xontrib-pyenv

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load pyenv

readable-traceback

Website

https://github.com/6syun9/xontrib-readable-traceback

Package

xontrib-readable-traceback website, MIT

Make traceback easier to see for xonsh.

Installation:

# install with pip
xpip install xontrib-readable-traceback

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load readable-traceback

schedule

Website

https://github.com/AstraLuma/xontrib-schedule

Package

xontrib-schedule website, MIT

Xonsh Task Scheduling

Installation:

# install with pip
xpip install xontrib-schedule

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load schedule

scrapy_tabcomplete

Website

https://github.com/Granitas/xonsh-scrapy-tabcomplete

Package

xonsh-scrapy-tabcomplete website, GPLv3

Adds tabcomplete functionality to scrapy inside of xonsh.

Installation:

# install with pip
xpip install xonsh-scrapy-tabcomplete

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load scrapy_tabcomplete

sh

Website

https://github.com/anki-code/xontrib-sh

Package

xontrib-sh website, MIT

Paste and run commands from bash, zsh, fish in xonsh shell.

Installation:

# install with pip
xpip install xontrib-sh

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load sh

ssh_agent

Website

https://github.com/dyuri/xontrib-ssh-agent

Package

xontrib-ssh-agent website, MIT

ssh-agent integration

Installation:

# install with pip
xpip install xontrib-ssh-agent

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load ssh_agent

tcg

Website

https://github.com/zasdfgbnm/tcg/tree/master/shells/xonsh

Package

xonsh-tcg website, MIT

tcg integration.

Installation:

# install with pip
xpip install xonsh-tcg

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load tcg

vox

Website

http://xon.sh

Package

xonsh website, BSD 3-clause

Python virtual environment manager for xonsh.

This xontrib is preinstalled with xonsh.

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load vox

vox_tabcomplete

Website

https://github.com/Granitosaurus/xonsh-vox-tabcomplete

Package

xonsh-vox-tabcomplete website, GPLv3

Adds tabcomplete functionality to vox inside of xonsh.

Installation:

# install with pip
xpip install xonsh-vox-tabcomplete

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load vox_tabcomplete

whole_word_jumping

Website

http://xon.sh

Package

xonsh website, BSD 3-clause

Jumping across whole words (non-whitespace) with Ctrl+Left/Right. Alt+Left/Right remains unmodified to jump over smaller word segments. Shift+Delete removes the whole word.

This xontrib is preinstalled with xonsh.

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load whole_word_jumping

xo

Website

https://github.com/scopatz/xo

Package

exofrills website, WTFPL

Adds an ‘xo’ alias to run the exofrills text editor in the current Python interpreter session. This shaves off a bit of the startup time when running your favorite, minimal text editor.

Installation:

# install with conda
conda install -c conda-forge xo    # install with pip
xpip install exofrills

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load xo

xog

Website

http://xon.sh

Package

xonsh website, BSD 3-clause

Adds a simple command to establish and print temporary traceback log file.

This xontrib is preinstalled with xonsh.

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load xog

xpg

Website

https://github.com/fengttt/xsh/tree/master/py

Package

xontrib-xpg website, Apache

Run/plot/explain sql query for PostgreSQL.

Installation:

# install with pip
xpip install xontrib-xpg

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load xpg

z

Website

https://github.com/AstraLuma/xontrib-z

Package

xontrib-z website, GPLv3

Tracks your most used directories, based on ‘frecency’.

Installation:

# install with pip
xpip install xontrib-z

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load z

zoxide

Website

https://github.com/dyuri/xontrib-zoxide

Package

xontrib-zoxide website, MIT

Zoxide integration for xonsh.

Installation:

# install with pip
xpip install xontrib-zoxide

Usage:

Run the following command to enable (or add it to your .xonshrc file to enable on startup.)

xontrib load zoxide

More xontribs you can find on Github.