IntelliJ plugin for Cursor CLI
翻譯準備中
外掛Kotlin · MakefileGitHub @vaughanb自行安裝營運者未確認
試用過了嗎? 點一下就好,不需要登入。
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
安裝型專案無需部署網域也可驗證。個人儲存庫可透過 GitHub 登入驗證,組織儲存庫可使用上方的儲存庫驗證檔案。
製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗An IntelliJ plugin that brings Cursor's AI agent into JetBrains IDEs via the Agent Client Protocol (ACP).
Ctrl+Shift+J or Add to CursorJ Chat at the bottom of the editor context menu (with a divider).cursor/rules/)SKILL.md under .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/ (and ~/ equivalents); manage scaffolds in Settings > Tools > CursorJ; type / in chat for an inline command/skill completion list (merged with ACP slash commands) and @ for skill file references; the popup keeps focus in the input so you can keep typing to filter, and @ inserts a path reference so the agent receives ResourceLinkContent for the skill fileClaude Opus 4.7 300K Extra High ▾) with a Model submenu (Auto first, MAX Mode, type-to-filter model list) and the current model's parameters as sections (Effort / Reasoning, Options such as Thinking and Fast, Context); values stay in sync with the Cursor CLI's /model picker (changes are CLI-wide; the 1M context option implies Max Mode)cursor/task), tasks appear in a collapsible list in the chat tool window (running vs completed, duration, tooltips).agent binary available in PATH)./gradlew buildPlugin
The plugin zip will be at build/distributions/cursorj-<version>.zip. Install it in your IDE via Settings > Plugins > Install Plugin from Disk.
Before using CursorJ, authenticate with Cursor:
agent login
| Shortcut | Action |
|---|---|
Alt+C | Focus CursorJ tool window |
Ctrl+Shift+J | Send selection to CursorJ |
Enter | Send prompt |
Shift+Enter | New line in input |
Esc | Cancel an in-progress edit |
The prompt bar shows one compact trigger next to the mode dropdown, like Cursor's own picker:
Claude Opus 4.7 300K Extra High ▾ (the muted suffix follows Cursor's short-name convention: context,
effort, then Fast and No Thinking when set). Click it, or press Space on it, to open the picker: a
Model submenu (Auto first, MAX Mode when the model has no context option, then a type-to-filter
list of models) followed by the current model's parameters as sections in Cursor's order: Effort /
Reasoning, Options (Thinking, Fast), then Context. Picking a value sends it to the agent with
session/set_config_option and closes the menu; switches keep it open. Two actions are unbound by default
and can be given shortcuts in Settings > Keymap: Open CursorJ Model Picker
(CursorJ.OpenModelPicker) and Cycle CursorJ Effort Level (CursorJ.CycleEffort).
Click Edit on an earlier message you sent to load it back into the input. Adjust the
text and press Enter to resend: the conversation branches from that message — everything after it
is discarded and the prior turns are replayed as context into a fresh agent session (the agent
provides no native session/fork). Press Esc or Cancel edit to abandon the edit without
changing the conversation.
Select Debug in the mode dropdown when you need to find a root cause with runtime evidence
rather than guessing at a fix. Because ACP does not expose a native debug session mode, CursorJ
keeps the agent session in agent and simulates Cursor's Debug workflow locally:
<project>/.cursorj/debug/ and (when
possible) a localhost-only HTTP endpoint (127.0.0.1) so instrumented code can append structured
lines even from browser/remote runtimes.This is functionally equivalent to Cursor's IDE Debug mode for typical repros; it is not the same server-side mode Cursor uses in its own agent panel.
CursorJ communicates with Cursor's agent via the Agent Client Protocol (ACP). It spawns agent acp as a subprocess and exchanges JSON-RPC 2.0 messages over stdio.
The plugin declares client capabilities for:
fs/find_text_in_files for lexical project searcheditor/get_open_files, editor/find_symbol, editor/list_file_symbols, editor/find_referencesCursor extension methods from the agent (for example cursor/task for subagents, _cursor/update_todos, cursor/create_plan, and cursor/ask_question) are handled so the agent can show todos, plans, interactive questions, and background task progress in the CursorJ UI where supported.
Some capabilities are constrained by what Cursor's agent exposes over the Agent Client Protocol. The following were verified empirically against the Cursor CLI agent (agent acp) and are agent/protocol limitations, not plugin bugs:
clientCapabilities._meta.parameterizedModelPicker: true on initialize (an undocumented agent flag, verified on agent builds 2026.07.23 through 2026.10.16). Without it the agent offers each model as one opaque variant string (e.g. claude-opus-4-7[thinking=true,context=300k,effort=xhigh,fast=false]) and rejects any other value with Invalid model value. CursorJ falls back to listing those variants in the picker's Model submenu if a future agent ignores the flag, and Show per-model parameters in settings turns the flag off. Parameter changes are global Cursor CLI state (the agent writes them to ~/.cursor/cli-config.json), so they also become the defaults for agent in a terminal and for other CursorJ tabs, and choosing the 1M context option makes the agent turn Max Mode on.agent about then shows, for example, Claude Opus 4.7 300K Medium). Cursor documents effort and Fast selection for Premium and higher plans, with Plus fixed at medium effort and Fast off.agent, plan, and ask — and rejects any other mode id (e.g. debug) with Invalid mode ID: … Valid modes: agent, plan, ask. CursorJ therefore keeps the ACP session in agent for Debug, and simulates Cursor's Debug workflow locally (see Debug mode below).session/fork capability. Editing an earlier message and resending is therefore implemented by starting a fresh session and replaying the prior conversation as context, rather than a server-side branch.To re-verify against a newer agent build, enable ACP raw JSON debug logging in settings and inspect the initialize request (clientCapabilities._meta) and the session/new response (the modes block, the model config option and any thought_level / model_config options) along with any session/set_config_option / session/set_mode errors. The manual ModelParameterCliIntegrationTest checks both picker modes against the installed agent.
CursorJ uses a hybrid local-first indexing model:
Persistence details:
~/.cursorj/projects/<projectDirName>-<hash>/ (per canonical workspace path), not in the project tree, so no .gitignore entry is needed. On first use, existing data under <workspace>/.cursorj/ is moved into that directory when the central copy is absent.Settings are available in Settings > Tools > CursorJ:
.cursor/rules/ from the same settings page (shown when an open project is available).cursor/skills/); global skills remain read-only in the listThe status bar shows connection and indexing lifecycle (Connected, Disconnected, Processing, Indexing, Index ready, Indexing failed).
Requires JDK 21.
./gradlew build # Compile and test
./gradlew buildPlugin # Package as installable zip
./gradlew runIde # Launch a sandboxed IDE with the plugin
Run all tests:
./gradlew build
Run manual real-CLI integration tests (local only, never CI):
CURSORJ_INTEGRATION=1 CURSOR_AGENT_PATH=/absolute/path/to/agent ./gradlew integrationTest
Manual integration guardrails:
integrationTest is manual-only and intentionally excluded from test/check/build.integrationTest even if it is requested.CURSORJ_INTEGRATION is not set to 1, the integration task is skipped.intellijPlatformTesting.testIde) so the full suite can be discovered and executed together; tests that require a live IntelliJ Application self-skip when one is not bootstrapped, while real-CLI tests (e.g. Debug mode, model routing) run.Model-switch troubleshooting:
session/set_config_option response configOptions and confirm category: "model" currentValue.session/set_config_option request with the selected model valuecurrentValueCurrent tests validate:
_meta capability serialization, thought_level / model_config option classification, Cursor's parameter suffix (300K Extra High), the picker's section order and selection behaviour, the prompt-bar trigger, and effort cyclingconnectedStatusDetail sources model from ACP-confirmed session configcursor/task (string and custom subagentType, completion payloads, log truncation)Integration tests (manual-only, CURSORJ_INTEGRATION=1) additionally cover:
session/set_config_option with ACP-authoritative confirmationModelParameterCliIntegrationTest): a Claude model's thought_level option is listed, settable and confirmed by the agent, a parameter the current model lacks is rejected, agent about run against the same config reports the chosen model and effort, and the agent stays in variants mode without the _meta flag; runs against a scratch CURSOR_CONFIG_DIR copy of cli-config.json so the user's CLI defaults are untouchedSKILL.md appears in ACP available_commands_update (skipped if the agent does not advertise it)debug; Debug keeps the session on agent; DebugLogServer evidence posted over HTTP is readable by the agent via fs tools; a Debug-prefixed workflow prompt completes and shows instrumentation / reproduce / evidence behavior. These tests talk to agent acp over raw JSON-RPC (same approach as the max-mode diagnostic) and do not require an IntelliJ Application.To run only the Debug-mode integration suite:
CURSORJ_INTEGRATION=1 ./gradlew integrationTest --tests "com.cursorj.integration.DebugModeIntegrationTest"
To run only the model parameter integration test:
CURSORJ_INTEGRATION=1 ./gradlew integrationTest --tests "com.cursorj.integration.ModelParameterCliIntegrationTest"
Thin IntelliJ fixture-based tests for PSI symbol/reference behavior are still recommended as a final integration safety net when targeting parity-level confidence across IDE/platform updates.
For release steps and publishing instructions, see RELEASING.md.
Maintainer note: before every release, update JetBrains Marketplace metadata in build.gradle.kts (pluginConfiguration.description and pluginConfiguration.changeNotes) so Marketplace text matches CHANGELOG.md.
For data handling details, see PRIVACY.md.
MIT License - see LICENSE for details.