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-perplexity

v0.2.0

Published

Perplexity web search for pi — uses your Pro/Max subscription, no API credits needed

Readme

pi-perplexity

A pi extension that gives your coding agent real-time web search powered by your Perplexity Pro or Max subscription

Requirements

  • pi coding agent
  • Bun runtime (available on PATH)
  • A Perplexity Pro or Max subscription
  • macOS (for zero-interaction auth) or an interactive terminal (for email OTP)

Installation

pi install npm:pi-perplexity

Or from GitHub:

pi install github:ivanrvpereira/pi-perplexity

Authentication

Run the login command once to cache your token:

/perplexity-login

The extension tries two methods in order:

  1. macOS Desktop App (zero interaction) — borrows the JWT directly from the Perplexity macOS app if it's installed and signed in. Nothing to type.
  2. Email OTP (interactive fallback) — prompts for your Perplexity email, sends a one-time code, and prompts for the code.

The token is saved to ~/.config/pi-perplexity/auth.json (mode 0600) and reused across sessions. On auth failure, run /perplexity-login --force to clear and re-authenticate.

Environment variables

| Variable | Description | |---|---| | PI_AUTH_NO_BORROW=1 | Skip macOS desktop app extraction and go straight to email OTP | | PI_PERPLEXITY_EMAIL | Pre-fill the email prompt (useful for non-interactive setups) | | PI_PERPLEXITY_OTP | Pre-fill the OTP prompt |

Usage

Once installed, the agent automatically calls perplexity_search whenever it needs current information. You can also ask it directly:

"Search Perplexity for the latest React 19 release notes"

Tool parameters

| Parameter | Type | Required | Description | |---|---|---|---| | query | string | ✅ | The search query | | recency | string | — | Filter by age: hour · day · week · month · year | | limit | number | — | Max sources to include (1–50) | | model | string | — | Model preference, e.g. pplx_pro_upgraded, pplx_pro, experimental, gpt54, gpt54_thinking, claude46sonnet, claude46sonnetthinking, gemini31pro_high, nv_nemotron_3_super, pplx_reasoning, pplx_alpha | | incognito | boolean | — | Whether to hide the search from Perplexity history; defaults to true |

Output format

The tool returns structured text the agent can reason over:

## Answer
React 19 introduces Actions, use() hook, and improved Server Components...

## Sources
3 sources
[1] React 19 Release Notes (1d ago)
    https://react.dev/blog/2024/12/05/react-19
    React 19 is now stable. This release includes Actions for async...

[2] What's New in React 19 (3d ago)
    https://vercel.com/blog/react-19
    A deep dive into the new primitives landing in React 19...

## Meta
Provider: perplexity (oauth)
Model: pplx_pro_upgraded

Queries default to is_incognito: true, but you can override that per call or via config.

How It Works

The extension calls Perplexity's internal SSE endpoint (perplexity_ask) using your subscription credentials obtained from the macOS app or via email OTP. Responses stream as incremental events that are merged into a final result.

When pi loads extensions under Node/jiti, direct fetch to Perplexity gets Cloudflare-challenged, so the search client shells out to a Bun subprocess — that's the only reason Bun is required.

Development

bun install        # Install dev dependencies
bun test           # Run tests
bunx tsc --noEmit  # Type check

License

MIT — see LICENSE for details.


Disclaimer

This project is intended for educational and demonstration purposes only. It reverse-engineers an undocumented internal endpoint and uses credentials borrowed from the Perplexity macOS desktop app. This likely violates Perplexity's Terms of Service. Use at your own risk — your account may be suspended. The author makes no warranties and accepts no liability for any consequences of its use.