npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@xynogen/pix-python

v0.4.0

Published

Pi tool — python_run: run local Python snippets as the current user, with indentation repair and a clean card

Readme

pix-python

Pi tool — python_run: run a local Python snippet behind an approval prompt.

What it does

Models often push Python through bash (python3 -c "…", python3 - <<EOF). That breaks on shell quoting and indentation, and the transcript shows a wall of shell. python_run is a cleaner front door for the same thing.

  • Parameters: intent (short why, required), code, and optional python.
  • Not a sandbox: the code runs as you, in the session cwd, with full file and network access.
  • Interpreter (python, optional):
    • omitted → python3 from binary.json (key python3), else PATH. An activated venv works when Pi was started inside it.
    • a venv or conda folder: .venv, venv, ~/envs/ml → its bin/python3 (Scripts\python.exe on Windows).
    • an interpreter file: .venv/bin/python, /usr/bin/python3.12.
    • a name on PATH: python3.12, pypy3.
    • Relative paths resolve against the session cwd. A missing path fails before the approval prompt, and the prompt shows the resolved interpreter.
  • Indentation repair before running: CRLF → LF, markdown fences dropped, leading tabs → 4 spaces, the indent shared by all lines removed. Line numbers in tracebacks stay correct. The script goes in on stdin, so there is no shell quoting.
  • Approval in the shared permission overlay (like sudo_run): intent, cwd, and the code. Choices: Allow, Allow for this session (until /new or /reload), Deny. 60 s idle auto-deny.
  • Unattended modes: /yolo approves. /afk denies unless the session was already allowed. Without a UI the tool is blocked.
  • Card: python_run <intent> with the highlighted code, then the output in the standard result frame. Completed calls collapse to ✓ python_run · <intent> · 3 lines · 120ms (collapse.tools.python_run in ~/.pi/agent/pix.json).
  • Output keeps the tail (tracebacks end there), capped at Pi's default line/byte limits. A cut card starts with … N earlier lines (ctrl+o to expand).

When pix-nudge is active, a standalone python -c / python - << in bash gets a one-time hint toward python_run. Piped … | python -c stays in bash.

Install

pi install npm:@xynogen/pix-python

Standalone and opt-in. @xynogen/pix-core does not bundle it, because it runs arbitrary local code.

License

MIT