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

@jasonish/pi-sandbox

v0.1.2

Published

My sandbox for the shitty coding agent.

Downloads

8

Readme

@jasonish/pi-sandbox

A security-focused sandbox extension for the pi coding agent.

pi-sandbox adds runtime guardrails around tool execution with three modes:

  • read-only — blocks edit/write and sandboxes bash for read-only access
  • read-write — allows edits/writes only under the directory where pi was started
  • yolo — disables restrictions

Features

  • Enforces write boundaries for edit and write
  • Wraps bash in bubblewrap (bwrap) in non-yolo modes
  • Optional git metadata passthrough so worktree git operations can still work in read-write
  • Session status + mode switching command/shortcut

Installation

npm install -g @jasonish/pi-sandbox

Or add it where you manage your pi extensions.

Requirements

  • Linux
  • bubblewrap (bwrap) available at:
    • /usr/bin/bwrap or
    • /bin/bwrap

If bwrap is missing, sandboxed bash execution is blocked unless you switch to yolo.

Usage

CLI flag

pi --sandbox-mode read-write

Supported values:

  • read-only
  • read-write (default)
  • yolo

Aliases accepted by the extension:

  • readonly, ro
  • readwrite, rw

In-session command

/sandbox-mode

or

/sandbox-mode read-only
/sandbox-mode read-write
/sandbox-mode yolo

Shortcut

  • Ctrl+X cycles modes:
    • read-onlyread-writeyolo → ...

Security model

read-only

  • edit and write are blocked
  • bash runs in a read-only filesystem sandbox
  • write access via tools: none

read-write

  • edit/write allowed only under the startup root directory (recursive)
  • bash can write to:
    • startup root directory
    • /tmp
    • required git metadata dirs (when applicable)

Git/worktree discovery (read-write mode)

To keep git usable in constrained environments, pi-sandbox discovers git metadata at session start:

  1. It checks for a .git entry in the startup root.
  2. It verifies the directory is inside a work tree.
  3. It resolves:
    • git rev-parse --absolute-git-dir
    • git rev-parse --path-format=absolute --git-common-dir
  4. If either resolved directory is outside the sandbox root, it is added as an extra writable bind for sandboxed bash in read-write mode.

Important behavior:

  • This is only granted when pi starts at a worktree root (where .git exists in the startup root).
  • If pi is started in a subdirectory of a larger repo, writes outside the startup root are intentionally not granted.
  • Nested/duplicate git metadata paths are de-duplicated.

yolo

  • No restrictions

Notes

  • Boundary checks canonicalize paths to reduce symlink/path traversal escapes.

Disclaimer

Use this extension at your own risk.

pi-sandbox is primarily meant to prevent accidental writes outside your project directory. It is not a guarantee of complete isolation and is not a replacement for stronger sandboxing (for example, running inside a container or virtual machine).

If a sandbox break occurs, responsibility for validating and securing your runtime environment remains with the user/operator.

License

MIT