Open Internet by MindsNet
xonsh/xonsh
Repository: xonsh/xonsh Stars: 9622 Forks: 736 Primary language: Python Discovery sources: awesome:awesome-data-science, awesome:awesome-python Selection score: 82.71 Usefulness score: 9.7 Source confidence score: 5.1 Languages: Python, Xonsh, Nix, HTML, Shell, Batchfile Topics: anthropic, claude, claude-code, cmux, data-engineering, data-scientists, devops, devsecops, hyper, iterm2 Summary: 🐚 Python-powered shell. Full-featured, cross-platform and AI-friendly. README excerpt: Xonsh ===== .. raw:: html <img src="https://avatars.githubusercontent.com/u/17418188?s=200&v=4" alt="Xonsh shell icon." align="left" width="100px"> **Xonsh** (sounds like "consh") is a full-featured and cross-platform Python-based shell. The language is a superset of Python 3 with seamless integration of shell functionality and commands. It works on all major platforms, including Linux, macOS, Windows, BSD, Jupyter, Android, Raspberry Pi and Nix. .. 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') $(@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 Everywhere** - **Xonsh is an Ecosystem** * - .. code-block:: python $PATH # ['/bin', '/sbin'] # Linux # ['/homebrew/bin'] # macOS # ['/usr/local/bin'] # FreeBSD # ['/mnt/c/Windows/System32'] # WSL # [r'c:\Windows\System32'] # Windows # ['/nix/store/0-python/bin'] # Nix # ['/data/termux/usr/bin'] # Termux # ['/tmp/.mount_x/usr/bin/'] # AppImage # ['/app/bin'] # Flatpak $PATH = ['/my/own/path
Computing & Technology, Computer Science, Software Engineering