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

@openchamber/opencode-cursor

v2.5.1

Published

Cursor models in OpenCode — native OAuth, live catalog discovery, agent-grade streaming. Direct API, no cursor-agent binary.

Readme

opencode-cursor

GitHub stars GitHub release npm Discord License

Cursor models in OpenCode. Direct API. Native OAuth.

opencode-cursor is the OpenCode plugin for running Cursor models — Claude, GPT, Gemini, Grok, Composer, and Cursor Auto — with thinking, effort variants, streaming, and tool calls that finish.

Use the models on your Cursor subscription from OpenCode and OpenChamber without a cursor-agent binary or an API key. The plugin authenticates in the browser, discovers the live catalog, and proxies the Cursor API over HTTP/2.

opencode-cursor — Cursor models in OpenCode, direct API, native OAuth

What you can do

Sign in with Cursor, not an API key

opencode auth login --provider cursor opens a PKCE browser flow. Tokens land in ~/.local/share/opencode/auth.json and refresh automatically. In OpenChamber, if no OAuth button appears, the plugin still prints a login URL — open it, then reload.

Use the models your account actually has

The plugin discovers Cursor’s catalog for your subscription, including Thinking, Fast, 1M context, and effort levels, and maps them to OpenCode-native choices.

Keep agent loops moving

Streaming, tool calls, and parked bridges are tuned for OpenCode agent turns. Reasoning gets time to think; silent post-tool hangs recover in about 90 seconds instead of stalling for minutes.

Skip the CLI wrapper

No cursor-agent install and no SDK child process. OpenCode talks to a local OpenAI-compatible proxy, which talks to Cursor over a persistent HTTP/2 bridge.

Quick start

1. Install the plugin

npm install -g @openchamber/opencode-cursor

2. Register it in OpenCode

Add (or merge) this into ~/.config/opencode/opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["@openchamber/opencode-cursor"],
  "provider": {
    "cursor": { "name": "Cursor" }
  }
}

3. Sign in with Cursor

opencode auth login --provider cursor

A browser window opens. Approve access. You do not need a Cursor API key.

4. Run a Cursor model

opencode run "Summarise this repository in five bullets." --model cursor/default

In the TUI, pick provider cursor, then a model (including Thinking / Fast / effort variants when Cursor exposes them).

From source (optional)

git clone https://github.com/openchamber/opencode-cursor.git
cd opencode-cursor
bun install && bun run build
npm install -g .

Authenticate

| Step | What happens | | --- | --- | | opencode auth login --provider cursor | Starts PKCE browser OAuth | | You approve in the browser | Cursor returns access + refresh tokens | | Plugin stores credentials | ~/.local/share/opencode/auth.json | | Access expires | Plugin refreshes silently; permanent 4xx → re-login |

Browser OAuth is the only supported path. You do not need a Cursor API key.

Architecture

OpenCode
  └─ /v1/chat/completions
       └─ Local OpenAI-compatible proxy
            └─ Node HTTP/2 bridge
                 └─ Cursor API (api2.cursor.sh)

| Layer | Responsibility | | --- | --- | | Plugin hooks | OAuth, provider config, model catalog, selection headers | | Proxy | OpenAI ↔ Cursor protocol, tool loops, stalls, checkpoints | | Transport | Persistent / one-shot HTTP/2 bridges to Cursor |

Model listings map Cursor’s variant catalog into OpenCode-native choices (Opus 4.8, Opus 4.8 Thinking, effort lowmax, Fast, …). Selection is encoded so Cursor receives the exact RequestedModel parameters your account supports.

Requirements

  • OpenCode
  • Active Cursor subscription
  • Bun (plugin runtime) · Node.js ≥ 18 (HTTP/2 bridge)

Development

bun install
bun run build
bun run test

Optional knobs: OPENCODE_CURSOR_PRE_OUTPUT_STALL_TIMEOUT_MS, OPENCODE_CURSOR_POST_TOOL_PRE_OUTPUT_STALL_TIMEOUT_MS, OPENCODE_CURSOR_TOOL_DEBOUNCE_MS.

Debug logs: OPENCODE_CURSOR_DEBUG=1.

Troubleshooting

| Symptom | Fix | | --- | --- | | Cursor missing from provider list | Confirm plugin includes @openchamber/opencode-cursor and restart OpenCode | | "sign in required" / login URL in model name | Open the printed URL, approve OAuth, reload | | Refresh rejected / re-login required | Run opencode auth login --provider cursor again | | Model not found | Wait for live discovery after login; avoid relying on stale offline catalogs | | Tool loop restates forever | Update to the latest plugin — post-tool resume and phase-aware stalls are required |

Contributing

Issues and pull requests belong in this repository: openchamber/opencode-cursor.

bun install
bun run build
bun run test

Acknowledgments

This plugin started as community work around Cursor access in OpenCode. Special thanks to:

  • OpenCode for the plugin API
  • OpenChamber for the workspace that runs this plugin in production
  • Contributors who shaped OAuth, model discovery, and the HTTP/2 proxy

License

MIT