Skip to content

Latest commit

 

History

History
181 lines (135 loc) · 8.11 KB

README.md

File metadata and controls

181 lines (135 loc) · 8.11 KB

open-cursor — cursor pro models, inside opencode

npm version downloads per month linux, macos, windows

Documentation

open-cursor connects OpenCode to the models available through your Cursor subscription. It translates prompts, streaming responses, thinking, and tool calls between OpenCode and Cursor (via a local openai-compatible proxy backed by @cursor/sdk).


Also worth a look: oakimov/cursor-opencode-provider takes a different approach, speaking Cursor's native agent protocol directly so OpenCode owns the tool loop. opencode-plugin-compat runs it unchanged on Kilo Code, MiMo Code, pi, oh-my-pi, and DeepSeek Harness. Excellent work.

Installation

You need OpenCode, a Cursor subscription, the cursor-agent CLI, and Node.js 20 or newer (22.13 or newer if you use an API key, which runs the Cursor SDK).

1. Sign in to Cursor

cursor-agent login

That login is all open-cursor needs. An API key is optional (see Authentication).

2. Add the plugin

OpenCode 2.x (the current default):

opencode plugin add @rama_nigg/open-cursor
opencode service restart

plugin add downloads the package and adds it to plugins in ~/.config/opencode/opencode.json. Upgrade later with opencode plugin update.

You can also add "plugins": ["@rama_nigg/open-cursor"] to that file by hand. Use the bare package name. OpenCode then downloads the package on its next start, and the download can outlast the 5 seconds it gives plugins to load. If you see Location plugins did not finish activating, run the command again.

Coming from OpenCode 1.x? Delete ~/.config/opencode/plugin/cursor-acp.js first. OpenCode 2.x still loads files in that folder, so the old copy runs next to the new one and requests can fail. See Moving from OpenCode 1.x to 2.x.

OpenCode 1.x
npm install -g @rama_nigg/open-cursor
open-cursor install

The installer adds the plugin and a cursor-acp provider block to your OpenCode config, backing up the existing file first. Upgrade with npm update -g @rama_nigg/open-cursor.

3. Check it works

opencode models | grep cursor-acp
opencode run -m cursor-acp/composer-2.5 "Reply with PONG"

Models and Cursor plans

Cursor moved to new plans (Free, Plus, Premium, Super, Ultra) on October 12, 2026, and what you can run now depends on which plan you have.

Plan Composer and Grok Claude, GPT, Gemini, GLM, Kimi and other third-party models
Free, Plus Weekly usage Not available
Premium, Super, new Ultra Weekly usage Prepaid credits at API list price, bought at grok.com/dashboard/billing
Legacy Pro, Pro+, Ultra Included Included, until you switch to a new plan

cursor-agent models lists every model whatever your plan, so the OpenCode picker shows models your account may not run. Pick one without credits and open-cursor tells you it bills from prepaid credits and suggests a Grok or Composer model. open-cursor doctor shows your plan; on OpenCode 2.x, where the CLI is not on your PATH, run npx -p @rama_nigg/open-cursor open-cursor doctor.

OpenAI is ending its partnership with Cursor, so GPT models may drop out of cursor-agent models. Configs that pin a gpt-* model then need a new one. On OpenCode 1.x, open-cursor doctor --deep lists configured models Cursor no longer offers.

Authentication

If cursor-agent login worked, you are done. open-cursor uses that login, and you do not need to store anything in OpenCode. /connect is optional on OpenCode 2.x.

If you do use /connect, run cursor-agent login first. The Log in with cursor-agent (browser) option then finds that login and connects in about a second.

You want to Do this
Use your Cursor login (default) cursor-agent login
Connect Cursor in OpenCode 2.x (optional) After cursor-agent login: /connect (TUI and Desktop) or opencode auth login → Cursor → Log in with cursor-agent (browser). If cursor-agent is not logged in yet, it shows Cursor's sign-in link instead
Use an API key instead opencode auth login → Cursor → API key (1.x: opencode auth login --provider cursor-acp), or set CURSOR_API_KEY
Remove a stored key (2.x) opencode auth logout cursor-acp. Without an interactive terminal, add the credential label from opencode auth list: opencode auth logout cursor-acp Cursor

API keys come from cursor.com/settings. With a key stored, OpenCode 2.x runs requests through the Cursor SDK. If Cursor rejects the key and cursor-agent is installed, open-cursor switches to cursor-agent and logs a warning (keys set in CURSOR_API_KEY excepted: cursor-agent reads that variable too, so unset a bad one). Do not enter a placeholder key to get past the login prompt; choose Log in with cursor-agent (browser) instead. On 2.x the newest login becomes the active account, so this also replaces a stored key; opencode auth switch cursor-acp <label> switches back.

Moving from OpenCode 1.x to 2.x

OpenCode 2.x reads the same opencode.json, so 1.x entries carry over. To switch cleanly:

  1. Delete ~/.config/opencode/plugin/cursor-acp.js if the 1.x installer created it. OpenCode 2.x still loads it, so an old copy runs beside the new one and requests can fail with cursor-agent exited with code 1 and no output. open-cursor doctor flags the file.
  2. Remove "cursor-acp" (or @rama_nigg/open-cursor) from the 1.x plugin list, then run opencode plugin add @rama_nigg/open-cursor.
  3. Delete the provider.cursor-acp block. On 2.x the plugin supplies models itself.
  4. If requests fail with Cursor rejected the API key, remove the old stored key with opencode auth logout cursor-acp.

More detail: OpenCode 2.0 setup.

Usage

Run a prompt with automatic model selection:

opencode run "Summarise this repository in five bullets." \
  --model cursor-acp/auto

The Plus plan has no Auto; use cursor-acp/composer-2.5 or a cursor-acp/grok-* model there. You can also start opencode and choose a cursor-acp/* model from its model picker.

Documentation

License

BSD-3-Clause


RAMA — terminal-native tooling for the linux desktop. More projects → · Sponsor ❤️