A JetBrains IDE plugin that runs cursor-agent (Cursor AI CLI) directly inside your IDE via an integrated terminal window.
- One-click access: Opens in a dedicated tool window on the right side
- Auto-start: Automatically launches
cursor-agentwhen you open the tool window - Seamless integration: Works like a native IDE terminal
- Smart detection: Automatically finds
cursor-agentin your PATH - Focus & Restart: Quick shortcuts to focus or restart the agent (hold Shift to clean restart)
- Privacy-first: No network calls, no data collection
- Claude Code Terminal — Built by @hamdiwanis, adapted from this project to support Claude CLI.
- IntelliJ IDEA 2023.2+ (or any JetBrains IDE: PyCharm, WebStorm, PhpStorm, etc.)
cursor-agentCLI installed and available in your PATH
From JetBrains Marketplace:
- Open IDE → Settings → Plugins → Marketplace
- Search for "Cursor CLI Terminal"
- Click Install
From Source:
- Clone this repository
- Run
./gradlew buildPlugin - Install the generated ZIP from
build/distributions/via Settings → Plugins → Install from Disk
- Open the "Cursor CLI Terminal" tool window from the right sidebar
- The
cursor-agentwill start automatically if detected in your PATH - Use Tools → Focus / Restart Cursor CLI Terminal (
Ctrl+Shift+Aon Windows/Linux,Cmd+Shift+Aon Mac) to:- Focus the tool window (normal click)
- Restart the session (hold Shift while clicking)
Build the plugin:
./gradlew buildPluginRun in IDE sandbox:
./gradlew runIdeProject Structure:
src/main/java/cn/lupishan/agent/- Plugin source codeCursorToolWindowFactory.java- Creates the tool window and terminal widgetStartCursorAgentAction.java- Handles focus/restart actionsCursorAgentUtils.java- Shared utility methods
src/main/resources/- Plugin resources (icons, plugin.xml)build.gradle- Build configuration
Tech Stack:
- Java 17
- IntelliJ Platform SDK
- Gradle with IntelliJ Plugin
Contributions are welcome! Please feel free to submit issues or pull requests.
This plugin can serve as a reference for building similar integrations with other CLI tools (like Claude Code, etc.).
Q: "cursor-agent not detected" error
A: Make sure cursor-agent is installed and in your PATH. Restart the IDE after installation.
For macOS users, if executing which cursor-agent in the terminal returns the correct path but it cannot be used in this plugin, please ensure that the PATH variable is also modified in ~/.bash_profile.
Q: First-time trust/login prompts
A: Follow the interactive prompts in the terminal window.
Q: Does this work with other JetBrains IDEs?
A: Yes! Works with PyCharm, WebStorm, PhpStorm, and all IntelliJ-based IDEs.
- No network calls
- No data collection
- All commands execute in the IDE's built-in terminal (fully transparent)
MIT License - see LICENSE file for details.
This plugin is an independent project and is not affiliated with or endorsed by Cursor or any other third-party vendors. It does not bundle, download, or install cursor-agent.
在 IntelliJ IDEA 右侧工具窗内,以交互式终端运行本地 cursor-agent。打开工具窗即可进入,直接在里面操作即可。
- 一键聚焦/重启: 用快捷键快速切换终端;按住 Shift 即可重建会话
- 自动启动: PATH 中检测到
cursor-agent即自动运行,无需额外配置 - 界面简洁: 独立右侧 ToolWindow,隐藏底部 Terminal,避免重复窗口
- 智能提示: 未检测到 CLI 时自动气泡提醒
- Claude Code Terminal — 由 @hamdiwanis 基于本项目改编,支持 Claude CLI。
- IntelliJ IDEA 2023.2+(或任何 JetBrains IDE:PyCharm、WebStorm、PhpStorm 等)
- 终端中可执行
cursor-agent(需自行安装并加入 PATH)
从 Marketplace 安装:
- 打开 IDE → Settings → Plugins → Marketplace
- 搜索 "Cursor CLI Terminal"
- 点击安装
从源码安装:
- 克隆本仓库
- 运行
./gradlew buildPlugin - 在 Settings → Plugins → Install from Disk 中选择
build/distributions/下生成的 ZIP
- 打开右侧 "Cursor CLI Terminal" 工具窗
- 若已安装
cursor-agent将自动启动 - 使用 Tools → Focus / Restart Cursor CLI Terminal(
Ctrl+Shift+A):- 普通点击:聚焦工具窗
- 按住 Shift:重启会话
构建插件:
./gradlew buildPlugin在沙盒中运行:
./gradlew runIde提示未检测到 cursor-agent?
请按你系统/团队方式安装,并确保 cursor-agent 在 PATH 中;重开工具窗或重启 IDE 后重试。
对于macOS用户,如果您在终端执行 which cursor-agent 返回了正确的路径但无法在本插件中使用,请确保 ~/.bash_profile 中也进行了PATH变量的修改。
首次弹出信任/登录界面?
在该终端内按提示键操作即可。
不联网,不收集任何数据;所有命令都在 IDE 内置终端中可见。
MIT License - 详见 LICENSE 文件
本插件为独立项目,与 Cursor 或任何第三方供应商无关;不打包/下载/安装 cursor-agent,也不收集数据。