# ============================================================ # AgentDock 适配器 · Cursor CLI(Wave 3) # 数据依据:调研底稿 agent-cli-survey-2026-08-24.md + 架构 §3.3 + 真机实测 # 真机:agent --version → 2026.08.11-e8db854;配置 ~/.cursor/cli-config.json(JSON)。 # 铁律:命令名是 `agent`(不是 cursor-agent);只有官方脚本渠道,无 npm。 # ============================================================ id: cursor name: Cursor CLI name_zh: Cursor CLI vendor: Cursor status: available adapter_version: 1.1.0 license: 专有(仅官方渠道安装、不重打包) platforms: windows: architectures: [x64] notes: 仅官方脚本渠道;命令名为 agent linux: distributions: [ubuntu] architectures: [x64] official: homepage: https://cursor.com docs: https://cursor.com/docs/cli allowed_hosts: [cursor.com, api2.cursor.sh] runtime_deps: [] install: preferred: official_script channels: - id: official_script platforms: [windows] script: url: https://cursor.com/install?win32=true kind: powershell_irm elevate: never post_checks: [detect] - id: official_script platforms: [linux] script: url: https://cursor.com/install kind: bash_pipe elevate: never post_checks: [detect] detect: executable: agent version_args: ["--version"] version_regex: "^(\\d{4}\\.\\d{2}\\.\\d{2})" path_hints: - "%LOCALAPPDATA%\\cursor-agent\\agent.cmd" update: method: self_update_cmd command: [agent, update] uninstall: method: manual_delete command: [] keep_config_default: true authorization: modes: - mode: browser_oauth command: [agent, login] status_command: [agent, status] notes_zh: 浏览器登录 Cursor 账号(NO_OPEN_BROWSER 可禁用自动打开浏览器) - mode: api_key env_keys: [CURSOR_API_KEY] notes_zh: API Key(CURSOR_API_KEY 环境变量或 --api-key 参数) # 配置机制(真机实测):~/.cursor/cli-config.json(JSON)。 # 账户体系为主(authInfo 存 OAuth 登录态);model.modelId / approvalMode 可经文件或 agent 命令调整。 configuration: files: - path: "~/.cursor/cli-config.json" format: json scope: user environment: - key: CURSOR_API_KEY sensitive: true maps_to_field: api_key fields: - id: model.modelId label_zh: 默认模型 group: common help_zh: 官方键 model.modelId,默认模型(真机为 default,即 auto) required: false sensitive: false type: string storage: file docs_url: https://cursor.com/docs/cli - id: approvalMode label_zh: 审批模式 group: advanced help_zh: 官方键 approvalMode(allowlist / yolo / default 等) required: false sensitive: false type: string storage: file docs_url: https://cursor.com/docs/cli - id: api_key label_zh: API Key group: auth help_zh: 存入系统密钥库(对应 CURSOR_API_KEY 环境变量;一般用账号登录即可,无需 API Key) required: false sensitive: true type: string storage: keyring docs_url: https://cursor.com/docs/cli models: command: [agent, --list-models] diagnostics: - rule_id: path.not_installed - rule_id: path.not_in_path - rule_id: version_conflict.multiple_copies - rule_id: config.corrupt documentation: quickstart_zh: 安装后运行 `agent login` 登录 Cursor 账号,或用 `agent -p "提示词"` 无头执行。 install_zh: 仅官方脚本渠道(Windows `https://cursor.com/install?win32=true` / Linux `https://cursor.com/install`),无 npm。`agent` 命令随 Cursor 安装(也可在 Cursor 内「Install agent command」)。 auth_zh: ① 浏览器登录:`agent login`(`agent status` 查看状态);② API Key:CURSOR_API_KEY 环境变量或 --api-key。 commands: - cmd: agent desc_zh: 启动交互式会话 - cmd: agent -p "提示词" desc_zh: 无头单次执行 - cmd: agent login desc_zh: 浏览器登录 Cursor 账号 - cmd: agent status desc_zh: 查看认证状态 - cmd: agent --model <模型> desc_zh: 指定模型 - cmd: agent update desc_zh: 更新到最新版 - cmd: agent --list-models desc_zh: 列出可用模型 - cmd: agent --version desc_zh: 显示版本号 params: - param: -p / --print desc_zh: 无头模式执行后退出 - param: --model desc_zh: 指定模型 - param: --output-format desc_zh: 输出格式(text / json / stream-json) - param: --sandbox desc_zh: 沙箱模式(enabled / disabled) - param: --list-models desc_zh: 列出可用模型 updated_at: "2026-08-25" risks_zh: - 命令名是 `agent`(不是 cursor-agent),detect 以 agent 为准 - 真机 `agent --version` 返回日期式版本 2026.08.11-e8db854(version_regex 已据此填写) - 账户体系为主,cli-config.json 高级键本表单只覆盖常用项,以官方文档为准