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

@jmcombs/pi-context7

v1.0.0

Published

Real-time documentation for the Pi coding agent via Context7.

Downloads

114

Readme

@jmcombs/pi-context7

Real-time documentation for the Pi coding agent via Context7. Gives the agent access to up-to-date, version-aware docs and code examples without polluting context with outdated information.

Quick Start

Get better library documentation in your agent in under a minute.

  1. Install the extension:

    pi install @jmcombs/pi-context7
  2. Configure your Context7 API key:

    /context7_onboard

    The command opens a clean, bordered prompt where you can securely enter your key. You can choose to save it permanently or use it only for the current session.

After setup, just ask the agent for documentation normally:

  • "How do I set up Row Level Security in Supabase?"
  • "Show me how to use server actions in Next.js 15"
  • "What's the current recommended way to do authentication in tRPC?"

The agent will automatically use the Context7 tools to fetch fresh, high-quality documentation and code snippets.

How It Works

This extension registers two tools:

  • context7_search — Finds the correct Context7 library ID for a programming language, framework, or library.
  • context7_get_docs — Retrieves detailed, version-specific documentation and real code examples for that library.

The tools support two authentication modes:

  • Persisted keys — Saved via /context7_onboard into ~/.pi/agent/auth.json (supports plain keys and !op read references).
  • Runtime-only keys — Entered ad-hoc when a tool is called and kept only for the current session (also supports !op read references).

This design lets you use Context7 without ever leaking keys into the LLM context.

/context7_onboard

Run this command to securely configure your Context7 API key:

/context7_onboard

It supports:

  • Entering keys directly or via !op read references
  • Overwriting an existing key (with confirmation)
  • Choosing between permanent storage and runtime-only for the current session

The command never exposes the actual key to the model.

After Setup

Just talk to the agent naturally. It will use Context7 automatically when it needs current documentation for a library.

Examples of good prompts:

  • "Find the Context7 library for Prisma and show me how to do relations"
  • "What's the recommended way to handle file uploads in Supabase right now?"
  • "Give me examples of using the new React 19 use() hook"

Checking Status

If you ever need to update or rotate your key, just run /context7_onboard again. It will detect the existing key and offer to overwrite it.

Development

This package lives in the pi-extensions monorepo.

# From the repo root
npm ci
npm run check
npm run test -- --run packages/context7

To test changes locally:

pi -e ./packages/context7