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-cursor-auth

v0.2.3

Published

pi extension: Cursor models through pi's harness (extensions and pi tools stay in the loop)

Readme

pi-cursor-auth

A pi extension that registers Cursor as a pi model provider, using your Cursor SDK API key.

Pi owns the agent loop, tools, and extensions (pi-lens, ponytail, hermes-memory, and the rest). Cursor is the model: this plugin streams thinking, text, and tool calls back into pi.

See the changelog for release notes. Contributor notes are in AGENTS.md.

Install

Requires pi. Then:

pi install npm:pi-cursor-auth

Pin a version if you want updates to skip this package:

pi install npm:[email protected]

Installs are written to ~/.pi/agent/settings.json. Use -l to install for the current project (.pi/settings.json) instead.

Only one cursor provider should be installed. Uninstall any other Cursor provider first.

Uninstall

pi uninstall npm:pi-cursor-auth

Use -l if the package was installed in the project.

Configure your Cursor API key

Choose one:

  1. Environment variable (set it before starting pi):

    export CURSOR_API_KEY="crsr_..."
    pi
  2. /login — in pi, run /login, choose Use an API key, choose Cursor, and paste the key. pi stores it in ~/.pi/agent/auth.json.

  3. /cursor-auth — run /cursor-auth and paste your key, or pass it as an argument: /cursor-auth crsr_.... Writes the key to ~/.pi/agent/auth.json under the cursor entry.

If pi started without a key, run /cursor-refresh-models after /login or /cursor-auth so the extension loads the live Cursor catalog. The startup fallback list is small.

Use

Pick a Cursor model with /model (or Ctrl+L), for example:

  • cursor/default
  • cursor/claude-opus-5
  • cursor/gpt-5.6-sol

You can also start pi with a model:

pi --model cursor/default

To save Cursor as the startup default, select it in /model and press Ctrl+S. That writes ~/.pi/agent/settings.json:

{
  "defaultProvider": "cursor",
  "defaultModel": "default"
}

Unknown model ids, including auto-smart, are mapped to cursor/default.

Commands

  • /cursor-auth [key] — store your Cursor API key
  • /cursor-refresh-models — re-discover the live Cursor catalog with the current key

How it works

The extension registers a complete pi Provider via createProvider(). It also mirrors its streams into pi-ai's compatibility registry so extensions that use legacy completeSimple() calls (such as Hermes Memory) can use the active Cursor provider. On each turn it:

  1. Uses pi /login (or CURSOR_API_KEY / /cursor-auth) for the Cursor API key
  2. Sends pi's system prompt, conversation, and tools (pi-lens, builtins, and the rest) to a Cursor model
  3. Keeps Cursor's built-in file/shell tools off. Model tool calls come back to pi as toolCall events so pi executes them and continues the loop
  4. Configures the SDK's bundled ripgrep binary when the host PATH does not expose it, so workspace ignore scanning remains quiet and functional

Limitations

  • Each pi model round-trip creates a fresh Cursor agent with tools: [] (or MCP-only for pi tools). Cursor does not keep its own tool loop or session memory.
  • Model context windows and costs are not available per-model from the SDK catalog, so costs show as $0 in usage. Token counts are accurate.

Development

Clone, install, and see AGENTS.md for layout, commands, and contribution rules.

git clone https://github.com/morizkay/pi-cursor-auth.git
cd pi-cursor-auth
npm install
export CURSOR_API_KEY="crsr_..."
npm test                 # unit + live integration (real Cursor call)
npm run check            # tsc --noEmit

The live test calls Cursor with your key and asserts a streamed response with token usage. It is skipped when CURSOR_API_KEY is unset.

For a local pi install from a checkout:

pi install ./