目标
让 Codex CLI 可以在终端里使用 @Chrome,调用本机 Chrome 登录态。
适合飞书、GitLab、知乎写作页、内部系统这类需要登录的网页。
1. 安装 Chrome 插件
打开官方说明:
https://developers.openai.com/codex/app/chrome-extension
按流程安装 Codex Chrome Extension。
安装后看 Chrome 扩展图标,确认 Codex 扩展显示 Connected。
2. 修改 Codex 配置
打开 Codex 配置文件。
Windows 路径:
C:/Users/你的用户名/.codex/config.toml
确认下面两行配置存在:
[plugins."chrome@openai-bundled"]
enabled = true
如果原来是 enabled = false,改成 true。
3. 重启 Codex CLI
关闭当前 Codex CLI 会话,重新启动:
codex
如果 Chrome 扩展刚装好,也建议一起重启 Chrome。
4. 验证 @Chrome
在 Codex CLI 中输入:
@Chrome 打开 https://developers.openai.com/codex/app/chrome-extension 并总结页面内容
如果 Codex 能打开 Chrome 页面并读取内容,说明已经连通。
也可以测试需要登录态的页面:
@Chrome 打开知乎写作页,帮我生成一篇草稿,审核后再发表
5. 常见问题
扩展装了,但 @Chrome 不能用:
先检查 config.toml 里是不是 enabled = true,然后重启 Codex CLI。
扩展不是 Connected:
确认 Chrome profile 是否正确。多个 Chrome profile 时,扩展必须安装在当前登录网页的那个 profile 里。
什么时候用 @Chrome:
公开网页不一定需要。需要登录态的网页更适合用 @Chrome。
我的验证
我本机验证后,Codex CLI 已经可以读取当前 Chrome 标签页,也可以打开知乎写作页写入草稿。
发布、付款、提交表单这类外部动作,建议仍然手动确认。