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

@aboutlo/pi-smart-edit

v0.4.0

Published

A [pi](https://github.com/badlogic/pi) extension that overrides the built-in `edit` tool with whitespace-tolerant matching, designed for local/quantized LLMs.

Readme

pi-extension-smart-edit

A pi extension that overrides the built-in edit tool with whitespace-tolerant matching, designed for local/quantized LLMs.

smart-edit is a drop-in replacement for edit that makes local/quantized LLM coding more reliable.

TL;DR

With Qwen 3.6 int4 runs (10 vs 10), smart-edit improved edit success from 46% to 89% and task pass from 40% to 80% on my local benchmark*.

It also reduced average runtime from 707s to 492s (~30% faster) on that benchmark set.

For Qwen 3.6 nvfp4, the latest patched run improved task pass (10% → 20%) but has lower edit success and slower runtime by far in my use case (see table).


Problem

Local LLMs often fail exact-text edits because of tiny formatting drift (indentation, quotes, trailing spaces). This causes retry loops and wasted tokens.

Solution

smart-edit keeps edit precise, but more tolerant for local models:

  1. Exact match (same behavior as built-in)
  2. Normalized line match (whitespace/quote tolerant)

So you keep strict edits, but avoid brittle failures from tiny formatting drift.

It supports the current edit contract and keeps compatibility with older argument shapes, so resumed sessions continue to work.

Install

pi install /path/to/pi-extension-smart-edit

Or for quick local testing:

pi -e /path/to/pi-extension-smart-edit/src/index.ts

Usage

After loading the extension, use edit normally in pi. The model/tooling handles the argument shape automatically.

Benchmark summary

This benchmark runs the same medium coding task 10 times per model, then reports:

  • edit success rate,
  • end-to-end task pass rate (typecheck + tests + no timeout),
  • runtime.

Results

| Model | Edit Success (without) | Edit Success (with) | Task Pass (without) | Task Pass (with) | Avg Time (without) | Avg Time (with) | | -------------- | ---------------------: | ------------------: | ------------------: | ---------------: | -----------------: | --------------: | | Qwen 3.5 int4 | 69% | 90% | 20% | 40% | 620s | 655s | | Qwen 3.5 nvfp4 | 98% | 86% | 20% | 20% | 651s | 814s | | Qwen 3.6 int4 | 46% | 89% 🔥 | 40% | 80% 🔥 | 707s | 492s 🔥 | | Qwen 3.6 nvfp4 | 74% | 72% | 10% | 20% | 706s | 839s |

  • Benchmark code isn't shared. I may do it later once I open source the other repo that I'm developing with only local LLMs