xonsh

作者 xonsh已验证

🐚 Python-powered shell. Full-featured, cross-platform and AI-friendly.

9,613
Stars
735
Forks
Python
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/xonsh/xonsh

快速入门

使用 xonsh 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

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']

    • .. code-block:: python

      xontrib load term_integration
      prompt_starship
      powerline
      dracula
      chatgpt
      django
      jupyter
      1password
      github_copilot
      history_encrypt

    • Xonsh is a Meta-Shell
    • Xonsh is User-extensible
    • .. code-block:: python

      xontrib load sh
      fish_completer

      osqueryi ! SELECT platform FROM os_version

      def nudf(cmd): return @.imp.pandas.DataFrame( $(@json nu -c @(cmd+'| to json'))) nudf!(ls -la)

      aliases['ai'] = 'ollama run llama3' ai! how to remove images in podman

    • .. code-block:: python

      @events.on_ptk_create def custom_keybindings(bindings, **kw): @bindings.add(Keys.ControlI) def say_whoami(event): echo $(whoami)

      @events.on_postcommand def _prompt_err_cmd(cmd, rtn, out, ts): if rtn != 0: $XONSH_PROMPT_NEXT_CMD = cmd.rstrip()

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

First steps


  • Installation <https://xon.sh/install.html>_ - isolated environment, package, container or portable AppImage.
  • Tutorial <https://xon.sh/tutorial.html>_ - step by step introduction in Xonsh.

Extensions


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

  • Xontribs on Github <https://github.com/topics/xontrib>_
  • Awesome xontribs <https://github.com/xonsh/awesome-xontribs>_
  • Core xontribs <https://xon.sh/api/_autosummary/xontribs/xontrib.html>_
  • Create a xontrib step by step from template <https://github.com/xonsh/xontrib-template>_

Projects that use Xonsh or compatible


  • Assistant <https://gitlab.com/waser-technologies/technologies/assistant>_: An AI-powered shell with a full Xonsh terminal and a multi-agent LLM system.
  • CrateDB <https://github.com/crate>_: The Database for Real-Time Analytics and Hybrid Search.
  • conda <https://conda.io/projects/conda/en/latest/>_ and mamba <https://mamba.readthedocs.io/en/latest/>_: Cross-platform package managers.
  • Starship <https://starship.rs/>_: Cross-shell prompt.
  • zoxide <https://github.com/ajeetdsouza/zoxide>_: A smarter cd command.
  • gitsome <https://github.com/donnemartin/gitsome>_: Supercharged Git/shell autocompleter with GitHub integration.
  • xxh <https://github.com/xxh/xxh>_: Using Xonsh wherever you go through the SSH.
  • kash <https://github.com/jlevy/kash>_: The knowledge agent shell.
  • Snakemake <https://snakemake.readthedocs.io/en/stable/snakefiles/rules.html#xonsh>_: A workflow management system to create reproducible and scalable data analyses.
  • any-nix-shell <https://github.com/haslersn/any-nix-shell>_: Xonsh support for the nix run and nix-shell environments of the Nix package manager.
  • lix <https://github.com/lix-project/lix>_: A modern, delicious implementation of the Nix package manager.
  • x-cmd <https://www.x-cmd.com/>_: x-cmd is a vast and interesting collection of tools guided by the Unix philosophy.
  • rever <https://regro.github.io/rever-docs/>_: Cross-platform software release tool.
  • Regro autotick bot <https://github.com/regro/cf-scripts>_: Regro Conda-Forge autoticker.

Jupyter-based interactive notebooks via xontrib-jupyter <https://github.com/xonsh/xontrib-jupyter>_:

  • Jupyter and JupyterLab <https://jupyter.org/>_: Interactive notebook platform.
  • Euporie <https://github.com/joouha/euporie>_: Terminal based interactive computing environment.
  • Jupytext <https://jupytext.readthedocs.io/>_: Clear and meaningful diffs when doing Jupyter notebooks version control.

Compiling, packaging, or accelerating Xonsh:

  • AppImage <https://github.com/appimage>_ is a format for distributing Linux applications and can be used to create a standalone xonsh package <https://xon.sh/appimage.html>_.
  • Nuitka <https://github.com/Nuitka/Nuitka>_ is an optimizing Python compiler that can build a native Xonsh binary <https://github.com/xonsh/xonsh/issues/2895#issuecomment-3665753657>_.
  • RustPython <https://github.com/RustPython/RustPython/>_ is a Python interpreter written in Rust that can run xonsh on top of Rust <https://github.com/xonsh/xonsh/issues/5082#issue-1611837062>_.

Welcome to the Xonsh shell community


The Xonsh shell is developed by a community of volunteers. There are a few ways to help out:

  • Write a note or an article about Xonsh.
  • Send a link to Xonsh to your favorite blogger.
  • Add Xonsh support in third party tool: package manager <https://github.com/topics/package-manager>, terminal emulator <https://github.com/topics/terminal-emulators>, console tool <https://github.com/topics/console>, IDE <https://github.com/topics/ide>.
  • Give a star to Xonsh repository and to xontribs <https://github.com/topics/xontrib>_ you like.
  • Solve a popular issue <https://github.com/xonsh/xonsh/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc>_ or high priority issue <https://github.com/xonsh/xonsh/issues?q=is%3Aopen+is%3Aissue+label%3Apriority-high+sort%3Areactions-%2B1-desc>_ or a good first issue <https://github.com/xonsh/xonsh/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22+sort%3Areactions-%2B1-desc>. You can start with the Developer guide <https://xon.sh/devguide.html>. Feel free to use LLM e.g. Github Copilot <https://github.com/copilot>_.
  • Take an idea <https://github.com/xonsh/xontrib-template/issues?q=is%3Aopen+is%3Aissue+label%3Aidea+sort%3Areactions-%2B1-desc>_ and create a new xontrib <https://github.com/xonsh/xontrib-template#why-use-this-template>_.
  • Contribute to Xonsh API <https://github.com/xonsh/xonsh/tree/main/xonsh/api>_.
  • Become Xonsh core developer by deep diving into xonsh internals. E.g. we feel a lack of Windows support.
  • Test Xonsh with compiler, interpreter, optimizer and report upstream issues (e.g. Nuitka <https://github.com/xonsh/xonsh/issues/2895#issuecomment-3665753657>, RustPython <https://github.com/xonsh/xonsh/issues/5082#issue-1611837062>).
  • Design more logos and images <https://github.com/anki-code/xonsh-logo>, improve Xonsh website <https://xon.sh/> (src <https://github.com/xonsh/xonsh/blob/12f12ce94f1b6c92218e22fbdaaa846e16ac8b2d/docs/_templates/index.html#L9>_).
  • Become a sponsor to Xonsh <https://github.com/sponsors/xonsh>_.

We welcome new contributors!

Credits


  • Thanks to Zulip <https://zulip.com/>_ for supporting the Xonsh community <https://xonsh.zulipchat.com/>_!
  • Thanks to HELLOTUX <https://www.hellotux.com/>_ for distributing the Xonsh t-shirts, backpacks and more <https://www.hellotux.com/xonsh>_!
  • Thanks to ADS.FUND for supporting Xonsh token <https://ads.fund/token/0xadf7478450b69a349ed9634b18584d2d3da81464>_!

常见问题

What is xonsh?

xonsh is an open-source devops skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by xonsh. 🐚 Python-powered shell. Full-featured, cross-platform and AI-friendly. It has 9,613 GitHub stars.

Is xonsh safe to use?

Yes. xonsh passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install xonsh?

Clone the repository with "git clone https://github.com/xonsh/xonsh" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is xonsh written in?

xonsh is primarily written in Python. It is open-source under xonsh on GitHub, so you can review or fork the full source.

Are there alternatives to xonsh?

Yes. SkillsLLM lists many other DevOps skills you can browse and compare side by side. Open the DevOps category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh xonsh against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ralphex

by umputun

Extended Ralph loop for autonomous AI-driven plan execution

1,445118Go
DevOps
查看详情

libretto

by saffron-health

The AI toolkit for building reliable browser automations

87767TypeScript
DevOps
查看详情

kubernetes-skill

by LukasNiessen

Kubernetes Skill for Claude Code and Codex. LLMs hallucinate a lot with K8s - KubeShark fixes this. It eliminates hallucinations and grounds your Kubernetes, Helm etc official best practices.

38171
DevOps
查看详情

terrashark

by LukasNiessen

Terraform Skill for Claude Code and Codex. LLMs hallucinate a lot with Terraform - TerraShark fixes this. It eliminates hallucinations, is designed for modular and secure code and grounds your IaC in the official Hashicorp Terraform best practices.

30723
DevOps
查看详情

TRAE-Skills

by HighMark-31

A curated collection of 150+ specialized AI Skills for software development, frontend, backend, automation, UI/UX, SEO, and DevOps. Each skill encapsulates a focused capability: generating code, templates, scripts, and production-ready workflows.

26540
DevOps
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情