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

pi-windows-path-guard

v1.0.1

Published

Prevents Windows-native Pi file tools from silently writing to mangled paths when agents reuse Git Bash/MSYS paths like /c/Users/...

Downloads

43

Readme

pi-windows-path-guard

A tiny Pi extension for Windows users.

Problem

Pi may use Git Bash for shell commands. Git Bash reports paths as /c/Users/.... If an agent passes that path into Windows-native file tools (read, write, edit), Node.js can resolve it to C:\c\Users\... instead of C:\Users\....

This creates a false-success trap: the agent reports "Successfully wrote X bytes", but the file lands in a phantom tree that Windows applications cannot find.

Behavior

This extension guards Pi file tool calls before execution:

| Path format | Action | |-------------|--------| | /c/Users/... | Normalizes to C:\Users\... | | /mnt/c/Users/... | Blocks in Windows-native mode | | C:\c\Users\... | Blocks as a known mangled trap | | C:\mnt\c\Users\... | Blocks as a known mangled trap | | C:\Users\... | Allows native Windows paths | | \\wsl.localhost\... | Allows intentional UNC access | | \\wsl.localhost\Ubuntu-24.04\... | Allows WSL UNC paths |

Install

pi install npm:pi-windows-path-guard

Or load directly for testing:

pi -e ./src/index.ts

Why

This prevents false-success writes where:

  • Agent sees bash pwd as /c/Users/DESKTOP/workspaces
  • Agent uses that path for write/read/edit
  • File lands at C:\c\Users\DESKTOP\workspaces\...
  • VLC, PowerShell, and Windows apps cannot find the file

Proof

Before (without extension):

write /c/Users/Me/workspace/file.txt "content"
→ write tool: "Successfully wrote 7 bytes"
→ actual location: C:\c\Users\Me\workspace\file.txt
→ PowerShell Test-Path C:\Users\Me\workspace\file.txt: False

After (with extension):

write /c/Users/Me/workspace/file.txt "content"
→ extension normalizes to C:\Users\Me\workspace\file.txt
→ write tool: "Successfully wrote 7 bytes"
→ actual location: C:\Users\Me\workspace\file.txt
→ PowerShell Test-Path C:\Users\Me\workspace\file.txt: True

Blocked paths:

write /mnt/c/Users/Me/workspace/wsl.txt
→ Blocked: "Blocked Windows path dialect trap: /mnt/c/... Use native Windows path C:\Users\..."

write C:\c\Users\Me\workspace\bad.txt
→ Blocked: "Blocked Windows path dialect trap: C:\c\... Use native Windows path C:\Users\..."

Guarded Tools

  • read
  • write
  • edit
  • grep
  • find
  • ls

Security Note

This extension intercepts all file tool calls on Windows and may block or mutate paths. Review the source before installing third-party Pi packages.

Source: GitHub

License

MIT