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.
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). Add the package to plugins in
~/.config/opencode/opencode.json and restart OpenCode:
{
"plugins": ["@rama_nigg/open-cursor"]
}
Use the bare package name. OpenCode installs and updates it for you.
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/auto "Reply with PONG"
Authentication
open-cursor uses your cursor-agent login by default. You do not need to
store anything in OpenCode.
| You want to | Do this |
|---|---|
| Use your Cursor login (default) | cursor-agent login |
| Log in from inside OpenCode 2.x | opencode auth login → Cursor → Log in with cursor-agent (browser) |
| Use an API key instead | opencode auth login → Cursor → API key (1.x: opencode auth login --provider cursor-acp), or set CURSOR_API_KEY |
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.
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:
- Replace
"cursor-acp"(or@rama_nigg/open-cursor) in the 1.xpluginlist with thepluginsentry above. - Delete the
provider.cursor-acpblock. On 2.x the plugin supplies models itself. - Remove
~/.config/opencode/plugin/cursor-acp.jsif the 1.x installer created it. - If requests fail with
Cursor rejected the API key, remove the old stored key withopencode 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
You can also start opencode and choose a cursor-acp/* model from its model
picker.
Documentation
- Installation
- OpenCode 2.0 setup
- Authentication
- Configuration
- Choosing a model
- MCP servers
- Troubleshooting
- Architecture
- Development
License
BSD-3-Clause
— terminal-native tooling for the linux desktop.
More projects → · Sponsor ❤️