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

vscode-pi-companion

v0.2.0

Published

Share VS Code context with pi coding agent

Readme

VS Code PI Companion

A VS Code extension that provides real-time IDE context (files, selection) to pi and other agents.

Features

  • Real-time context: Monitors open files, cursor position, and selection
  • Instant updates: Pushes context changes via SSE
  • Seamless integration: Selected lines injected into LLM context automatically
  • Widget display: Shows current file/selection in pi UI

Architecture

VS Code Extension → SSE ← pi Extension

  • VS Code: Context tracking, SSE server
  • pi: SSE client, Widget, Context injection

Installation

1. Install pi Extension

pi install git:github.com/ravshansbox/vscode-pi-companion

Or manually:

mkdir -p ~/.pi/agent/extensions/vscode-pi-companion
git clone [email protected]:ravshansbox/vscode-pi-companion.git ~/.pi/agent/extensions/vscode-pi-companion
cd ~/.pi/agent/extensions/vscode-pi-companion
npm install

2. Install VS Code Extension

The pi extension will auto-install the VS Code extension when you run pi in a VS Code terminal.

Alternatively, install manually:

# Download the .vsix from releases
code --install-extension vscode-pi-companion.vsix

Then reload VS Code window.

Usage

  1. Open a folder in VS Code
  2. Open VS Code terminal (`Ctrl+``)
  3. Run pi
  4. The extension auto-connects and shows current file in widget
  5. Select code → widget updates instantly
  6. Selected lines are injected into LLM context automatically

Widget Display

📄 filename           # no selection
📄 filename L9        # single line
📄 filename L9:14     # multi-line selection

MCP Tools (for LLM)

| Tool | Description | |------|-------------| | get_ide_context | Full IDE context | | get_current_file | Current file with selection | | list_open_files | List all open files |

Development

# Build VS Code extension
npm install
npm run compile

# Package as .vsix
npx vsce package

Press F5 to run in Extension Development Host.