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

@maxpaulus/pi-nvim

v0.1.1

Published

Send prompts and editor context from Neovim to the active Pi conversation

Readme

@maxpaulus/pi-nvim

Send a prompt and the current Neovim context to the conversation open in Pi.

  • <leader>ai opens a prompt input.
  • If Pi is running with the included extension, the prompt becomes a real user message in its active conversation.
  • If Pi is busy, the message is queued as a follow-up.
  • If no Pi instance is available, Neovim opens a split running Pi with the prompt as its first message.
  • Modified file buffers are saved before the prompt is sent, so Pi edits the current version.
  • Successful Pi edit and write calls automatically reload matching unmodified buffers.
  • Normal mode includes a bounded excerpt around the cursor. Visual mode includes the selected lines.

Requirements

  • Neovim 0.10 or newer
  • Pi 0.84 or newer
  • macOS or Linux (the transport uses a Unix domain socket)

Install

Install the Neovim plugin with your plugin manager. For lazy.nvim:

"maxpaulus43/pi-nvim"

The plugin applies its defaults automatically. Call require("pi-nvim").setup() only when you need custom options.

Install the Pi package globally:

pi install npm:@maxpaulus/pi-nvim

Restart any running Pi instances after installation. pi list should show the package.

Configuration

require("pi-nvim").setup({
  mapping = "<leader>ai",
  context_lines = 20,
  split = "botright split",
  pi_command = { "pi" },
  socket_timeout_ms = 1500,
})

The mapping works in normal and visual mode. Context contains the working directory, absolute buffer path, filetype, cursor, modified state, and numbered source lines. A modified file buffer is written before context is captured. If it cannot be written, the prompt is not sent.

The Pi extension reports successful edit and write calls back to Neovim over a local Unix socket. Neovim reloads a matching buffer only when it has no newer unsaved changes; otherwise it preserves the buffer and shows a warning.

Multiple Pi instances

When multiple Pi instances are available, Neovim shows an instance picker. Instances whose working directory exactly matches Neovim's current working directory appear first, followed by the most recently opened sessions. The preferred instance is initially highlighted. Unreachable instances are skipped during delivery.

Security

The extension creates its runtime directory with mode 0700 and its socket and metadata with mode 0600. The extension accepts only a versioned JSON message containing the prompt and limits requests to 256 KiB. Like all Pi extensions, it runs with the user's permissions; review it before installation.

Development

For local testing, install the repository as both a Neovim plugin and a Pi package:

{ dir = "/path/to/pi-nvim" }
pi install /path/to/pi-nvim

For a one-off Pi test without installing the extension:

pi -e ./pi-extension/index.ts

Run the Lua tests:

nvim --headless -u tests/minimal_init.lua -l tests/test.lua

Check that Pi can load the extension without starting a conversation:

PI_OFFLINE=1 pi -e ./pi-extension/index.ts --list-models