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-fzf-files

v0.2.0

Published

Zero dependencies, pure TS, Pi's @ file fzf-style syntax fuzzy finder.

Readme

pi-fzf-files banner

pi-fzf-files - Pi extension

Pure TypeScript replacement for Pi's default @ file-reference autocomplete. It builds an in-memory file index on session start/restart, refreshes it asynchronously when you use @, and searches it with fzf-style extended query syntax—no fzf, fd, sqlite package, or other runtime dependency required.

Features

  • Replaces @... file suggestions through ctx.ui.addAutocompleteProvider().
  • Does not delegate on @ misses, so Pi's default fd-backed finder does not appear for file references.
  • Starts indexing asynchronously on every session start/restart.
  • Starts a background reindex when you enter an @ file query, unless one is already running.
  • Searches a cached in-memory index instead of walking the filesystem per keystroke.
  • Rebuilds into a temporary index and atomically swaps it in, so background reindexing does not clear existing suggestions.
  • Follows symlinked files and directories while avoiding recursive symlink cycles.
  • Skips heavy directories such as .git, node_modules, dist, build, .next, coverage, target, and virtualenv/cache folders.
  • Supports fzf extended syntax:

| Input | Match type | Description | | -------------------------------------------- | --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | | cmp | fuzzy-match | Items that match cmp, such as ComponentMap or createMessageParser. | | 'useState | exact-match (quoted) | Items that include useState, such as useStateReducer. | | 'auth' | exact-boundary-match (quoted both ends) | Items that include auth at word boundaries, such as auth-token or auth.service. | | ^use | prefix-exact-match | Items that start with use, such as useUserSession. | | Controller$ | suffix-exact-match | Items that end with Controller, such as UserController. | | !deprecated | inverse-exact-match | Items that do not include deprecated. | | !^legacy | inverse-prefix-exact-match | Items that do not start with legacy. | | !Spec$ | inverse-suffix-exact-match | Items that do not end with Spec. | | sb controller | multiple-terms (AND) | Items that match both sb AND controller, such as SidebarController. | | sb | controller | OR-match | Items that match either sb OR controller, such as Sidebar or UserController. | | 'controller auth | session | exact AND OR-match | Items containing controller exactly, and matching either auth or session fuzzy, such as AuthController.ts or session_controller.rb. | | 'auth | 'session | multiple exact (OR) | Items containing either auth exactly or session exactly, such as auth.ts or session.py (excluding author.ts). | | 'src 'test | multiple exact (AND) | Items containing both src exactly and test exactly, such as src/app.test.ts. | | foo|bar | literal pipe | Matches a literal pipe inside a token, such as docs/foo\|bar.md (no spaces around \|). | | Foo | smart-case match | Uppercase characters make the term case-sensitive (e.g., Foo only matches items containing Foo, but foo matches both foo and Foo). |

Spaces can be escaped inside a token with \.

Frecency

Submitted prompts are scanned for @path and @"path with spaces" references. Referenced files are recorded in a project-scoped JSON hashmap under:

~/.pi/agent/fzf-files/frecency-v1/<cwd-hash>.json

Ranking uses match quality first. Frecency is a tie-breaker, so frequently/recently referenced files move up when the textual match is otherwise equal.

SQLite would only help once the index itself lives on disk or queries need cross-project aggregation. For this extension the hot path is an in-memory top-K scan over cached paths, while frecency lookups are O(1) map reads. The JSON store keeps runtime installs dependency-free and portable across Pi's supported Node runtimes.

Install

From npm:

pi install npm:pi-fzf-files

Try it without installing permanently:

pi -e npm:pi-fzf-files

From this repository:

pi -e ./pi-fzf-files
# or
pi install ./pi-fzf-files

If you also want Pi startup to avoid provisioning the built-in fd helper entirely, run Pi with PI_OFFLINE=1 or add a Pi core setting when available. This extension itself never invokes fd.

Commands

/fzf-files help
/fzf-files stats
/fzf-files reindex
/fzf-files clear-frecency

/fzf-files help opens a formatted Markdown help view with separate command and syntax-example tables /fzf-files syntax opens a syntax examples table

Development

bun test
npm run typecheck