Files
Agent-Tools/adapters/tools/codex.yaml
T
leefer 01996a80fe Wave 2: 五件套打通全链路(安装/检测/配置/授权/诊断)
- 五个适配器 YAML 全字段补齐(codex/claude-code/gemini/kimi/opencode)
- agentdock-config:TOML/JSON 编解码 + 原子写 + 自动备份
- agentdock-diag:PATH/依赖版本/版本冲突/配置损坏四类规则
- agentdock-core:detectCli/previewAction/runAction 流式/readConfig/writeConfig/authStatus/diagnose
- Tauri IPC 命令 + CLI 详情页/安装确认弹窗/配置表单/诊断页
- cargo test 75 项通过(含 4 项真机 ignored 自测),前端 build 通过
2026-08-25 08:58:38 +08:00

132 lines
3.6 KiB
YAML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ============================================================
# AgentDock 适配器 · OpenAI Codex CLIWave 2 全字段)
# 数据依据:调研底稿 agent-cli-survey-2026-08-24.md §1 + 架构 §3.3
# ============================================================
id: codex
name: Codex CLI
name_zh: Codex CLI
vendor: OpenAI
status: available
adapter_version: 1.0.0
license: Apache-2.0
platforms:
windows:
architectures: [x64]
notes: 原生支持(PowerShell 脚本安装,非 WSL);亦可走 npm
linux:
distributions: [ubuntu]
architectures: [x64]
official:
homepage: https://github.com/openai/codex
docs: https://learn.chatgpt.com/docs/codex/cli
allowed_hosts: [chatgpt.com, github.com, releases.openai.com, registry.npmjs.org]
runtime_deps: []
install:
preferred: npm
channels:
- id: npm
platforms: [windows, linux]
command: [npm, install, -g, "@openai/codex"]
package: "@openai/codex"
elevate: never
post_checks: [detect]
- id: official_script
platforms: [windows]
script:
url: https://chatgpt.com/codex/install.ps1
kind: powershell_irm
elevate: never
post_checks: [detect]
- id: github_release
platforms: [windows, linux]
package: codex
elevate: never
post_checks: [detect]
detect:
executable: codex
version_args: ["--version"]
version_regex: "^codex-cli (\\d+\\.\\d+\\.\\d+)"
version_unconfirmed: true
update:
method: npm_update
command: [npm, update, -g, "@openai/codex"]
uninstall:
method: npm_uninstall
command: [npm, uninstall, -g, "@openai/codex"]
keep_config_default: true
authorization:
modes:
- mode: browser_oauth
command: [codex, login]
status_command: [codex, login, status]
notes_zh: 浏览器登录 ChatGPT 账号(需 Plus/Pro/Business/EDU/Enterprise 计划)
- mode: device_code
command: [codex, login, --device-auth]
notes_zh: 设备码登录,不弹浏览器
- mode: api_key
command: [codex, login, --with-api-key]
env_keys: [OPENAI_API_KEY]
notes_zh: API Key 从系统密钥库读取,经 stdin 注入,不进 argv
configuration:
files:
- path: "~/.codex/config.toml"
format: toml
scope: user
environment:
- key: OPENAI_API_KEY
sensitive: true
maps_to_field: api_key
- key: OPENAI_BASE_URL
sensitive: false
maps_to_field: openai_base_url
fields:
- id: model
label_zh: 默认模型
help_zh: Codex 使用的默认模型(如 gpt-5.6-terra
required: false
sensitive: false
type: string
storage: file
- id: openai_base_url
label_zh: Base URL
help_zh: 自定义 OpenAI 兼容端点(简化键)
required: false
sensitive: false
type: url
storage: file
- id: api_key
label_zh: API Key
help_zh: 存入系统密钥库,写入后仅显示「已保存」
required: false
sensitive: true
type: string
storage: keyring
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: 安装后运行 `codex` 登录账号,或用 `codex exec "任务"` 无头执行。
commands:
- cmd: codex
desc_zh: 启动交互式会话
- cmd: codex exec "提示词"
desc_zh: 无头单次执行
- cmd: codex login status
desc_zh: 查询登录状态
updated_at: "2026-08-24"
risks_zh:
- --version 官方文档未确认,适配器已标 version_unconfirmed 并实测兜底