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

@mario-gc/pi-context7

v0.2.0

Published

Context7 integration for pi coding agent — fetch up-to-date library documentation and code examples

Readme

@mario-gc/pi-context7

Context7 integration for pi coding agent. Fetch up-to-date library documentation and code examples directly from Context7.

Installation

Global install (npm):

pi install npm:@mario-gc/pi-context7

Global install (GitHub):

pi install git:github.com/mario-gc/pi-context7

Project install (adds to .pi/settings.json):

pi install -l npm:@mario-gc/pi-context7
pi install -l git:github.com/mario-gc/pi-context7

Local development:

pi -e ./extensions/context7.ts

Usage

This package provides two tools for the agent:

  1. context7_search_library — Search Context7 for libraries by name. Resolves a library name to a Context7 library ID.
  2. context7_get_context — Get up-to-date documentation context and code examples for a library from Context7.

Workflow: search for a library → get documentation context for code examples and API reference.

Skill

A companion skill (context7) is also available. Use /skill:context7 to load it.

API Key Setup

Context7 uses an API key for authenticated access (higher rate limits). Unauthenticated requests work but have stricter rate limits.

Environment variable:

export CONTEXT7_API_KEY=ctx7sk-your-api-key-here

Auth file (~/.pi/agent/auth.json):

{
  "context7": {
    "apiKey": "ctx7sk-your-api-key-here"
  }
}

Generate an API key at https://context7.com/dashboard.

Cache

Responses are cached locally for performance and offline resilience.

Cache location: ~/.pi/agent/cache/context7/

  • Search results cached for 7 days
  • Documentation context cached for 3 days

Offline mode: Set PI_OFFLINE=1 to use cached results only:

PI_OFFLINE=1 pi -e ./extensions/context7.ts

Cache TTL override: Set CONTEXT7_CACHE_TTL in minutes:

CONTEXT7_CACHE_TTL=60 pi -e ./extensions/context7.ts

License

MIT