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 🙏

© 2025 – Pkg Stats / Ryan Hefner

opencode-cursor-auth

v1.0.16

Published

Authentication provider for Cursor, extracting credentials from local environment or agent.

Readme

opencode-cursor-auth

Cursor authentication + local Cursor Agent backend for OpenCode.

This plugin lets you use cursor-agent as an OpenAI-compatible provider inside OpenCode (no Cursor IDE required).

Requirements

  • cursor-agent installed (curl -fsSL https://cursor.com/install | bash)
  • Logged in once (the plugin can trigger cursor-agent login)

Install

Add the plugin to your OpenCode config (~/.config/opencode/opencode.json):

{
  "plugin": [
    "[email protected]",
    "opencode-gemini-auth",
    "[email protected]"
  ],
  "provider": {
    "cursor": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Cursor Agent (local)",
      "options": {
        "baseURL": "http://127.0.0.1:32123/v1"
      },
      "models": {
        "auto": { "name": "Cursor Agent Auto" },
        "gpt-5": { "name": "Cursor Agent GPT-5 (alias → gpt-5.2)" },
        "gpt-5.2": { "name": "Cursor Agent GPT-5.2" },
        "gpt-5.1": { "name": "Cursor Agent GPT-5.1" },
        "gpt-5.1-codex": { "name": "Cursor Agent GPT-5.1 Codex" },
        "sonnet-4": { "name": "Cursor Agent Sonnet 4 (alias → sonnet-4.5)" },
        "sonnet-4.5": { "name": "Cursor Agent Sonnet 4.5" },
        "sonnet-4.5-thinking": { "name": "Cursor Agent Sonnet 4.5 Thinking" }
      }
    }
  }
}

Login

opencode auth login
  • Select provider: Other
  • Provider id: cursor
  • Method: Login via cursor-agent (opens browser)

Run

opencode run "decime hola" --model cursor/gpt-5
opencode run "decime hola" --model cursor/gpt-5.2

How It Works

  • On startup, the plugin starts a local HTTP proxy on 127.0.0.1:32123.
  • OpenCode uses @ai-sdk/openai-compatible against http://127.0.0.1:32123/v1.
  • The proxy translates /v1/chat/completions into a cursor-agent CLI call.

Current Limitations

This integration is intentionally minimal and works well for plain chat/completions, but it does not currently provide:

  • OpenCode tool-calling (LSP/TODO/tools): cursor-agent is a CLI agent and does not speak OpenAI tool-calls, so OpenCode can’t route tool calls.
  • Token usage / cost accounting: cursor-agent does not expose token counts per request in a way OpenCode can consume.
  • “Thinking” UI sections: we only stream assistant text; there’s no separate reasoning payload.

Troubleshooting

  • Unauthorized: cursor-agent failed.: your model name is not supported by your cursor-agent. Try cursor/gpt-5.2 or cursor/auto.
  • Unable to connect: another opencode instance might not have the proxy running, or the port 32123 is taken by something else. Try closing other opencode sessions, or change the port in both the plugin and opencode.json.

License

ISC