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.