Building
Build and install open-cursor from a local checkout.
The source build uses Bun and emits the plugin, library, and CLI entry points
into dist/.
Prerequisites
- Git
- Bun
- Node.js 20 or newer
cursor-agentfor an end-to-end local run
Clone and build:
git clone https://github.com/Nomadcxx/opencode-cursor.git
cd opencode-cursor
bun install
bun run buildThe build produces:
dist/plugin-entry.js OpenCode plugin default export
dist/index.js library API
dist/cli/opencode-cursor.js
dist/cli/discover.js
dist/cli/mcptool.jsplugin-entry.js intentionally exposes only the default plugin export.
Consumers that need the library surface use the package's ./lib subpath.
Install the checkout
The repository script installs dependencies, builds, and links the entry point into OpenCode's plugin directory:
./scripts/install-plugin.shIt creates:
~/.config/opencode/plugin/cursor-acp.js
→ <checkout>/dist/plugin-entry.jsAdd cursor-acp to the plugin array in opencode.json if it is not already
present, then verify:
opencode models | grep cursor-acpBecause this is a symlink install, rebuilding the checkout updates the file OpenCode loads. Restart OpenCode after a build so the plugin process is fresh.
Watch mode
For TypeScript changes:
bun run devThe watcher rebuilds output but does not restart OpenCode. Keep runtime restarts explicit so an old child process cannot disguise which code is under test.
Read Testing before submitting a change.