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

@ian-pascoe/pi-formatter

v0.1.0

Published

Configured automatic post-edit formatting for Pi

Readme

@ian-pascoe/pi-formatter

Configured automatic post-edit formatting for Pi.

Install

pi install npm:@ian-pascoe/pi-formatter
# or
pi install git:github.com/ian-pascoe/pi-extensions

For a local checkout, run pi -e ./packages/pi-formatter/src/index.ts. Install formatter executables separately.

Settings

Pi Formatter reads the formatter key from Pi's global ~/.pi/agent/settings.json and trusted project .pi/settings.json:

{
  "formatter": {
    "timeoutMs": 30000,
    "formatters": {
      "markdownlint-cli2": {
        "command": "markdownlint-cli2",
        "args": ["--fix", "$FILE"],
        "files": {
          "extensions": [".md", ".mdx"],
          "fileNames": ["README"]
        },
        "requireRootMarker": true,
        "rootMarkers": ["package.json", ".git"],
        "environment": {}
      }
    }
  }
}

Each formatter requires a non-empty command and at least one file extension or exact basename. Extensions include the leading period. Matching is case-sensitive. Arguments are passed directly to the executable without a shell. Every $FILE substring in an argument is replaced with the absolute changed-file path.

A formatter using $FILE runs once per matching changed file. A formatter without $FILE runs once per matching workspace root, allowing full-project formatting. rootMarkers are basename glob patterns; the nearest matching ancestor becomes the command working directory and Pi's working directory is the fallback. Set requireRootMarker to true to skip the formatter unless any root marker exists above the changed file; it defaults to false. A required empty rootMarkers list is invalid. Formatters run sequentially in configuration order. Successful output is silent. A timeout, spawn error, or non-zero exit appends a warning to the original tool result without changing that result's success state; later formatters still run.

Global and project timeoutMs values override by scope. A project formatter replaces the complete global definition with the same ID; set it to null to disable it. Invalid definitions and fields are quarantined individually and reported at session startup. An invalid project replacement still shadows the global formatter. Untrusted project settings are ignored.

Supported mutations

Formatting runs after successful native edit and write operations, Codex-style apply_patch results, and applied Pi LSP Workspace Edit Previews. Changed and created files plus rename destinations are formatted; deleted or vanished files are skipped.

When the Git collection is installed, Pi Formatter loads before Pi LSP so Post-edit Diagnostics observe formatted content. Separately installed extensions depend on Pi's configured extension order.

Security

Trusted formatter settings execute arbitrary local programs with the Pi process's environment and permissions. Review project settings and formatter binaries before trusting a project.