How-toMulti-sourceSelected

LCU lets Claude Code and other agents reuse Codex Computer Use

Why we picked it

Instead of reimplementing screen control, LCU piggybacks on the ChatGPT desktop app's built-in runtime, so agents get OpenAI's computer-use stack without an OpenAI subscription. Developers using Claude Code or Codex CLI on Apple Silicon macOS or X11 Linux can add GUI automation through two tools and an MCP bridge. Chrome control rides on OpenAI's official extension with per-site approval, a narrower path than standalone browser agents.

amontlabs/lcu is an open-source project that exposes the Computer Use runtime bundled with the official ChatGPT desktop app to other AI agent tools via MCP.

Image · 宝玉
Body

It forwards OpenAI's original js/js_reset tool interface, where the model writes JavaScript against a cua object to click, type, take screenshots and read accessibility info.

On macOS, the repo's records show the init instructions and first-call guide are byte-identical to what official Codex receives.

Supported agent tools are Pi, Codex CLI and Claude Code, with Oh My Pi and Hermes as experimental.It runs on Apple Silicon macOS, X11 Linux (ARM64 and x86-64), with Windows 11 in candidate stage;

no ChatGPT or Codex login is required.

Original · 宝玉

学习研究了下 amontlabs/lcu 这个项目,它把 Codex 的 Computer Use(让 AI 看屏幕、点鼠标、敲键盘来操作电脑的能力)单独拆了出来,让 Claude Code、Codex CLI、Pi 等其他 AI Agent 工具也能调用。 我本来还以为它是模仿 Codex 实现了一套,原来是直接用的 Codex 的 Computer Use,在本机找到已安装的 ChatGPT 桌面版,启动其中 OpenAI 自带的 Computer Use 运行时,再通过 MCP 接到你用的 Agent 工具里。仓库文档写明,指令、执行和权限策略都以 OpenAI 原版运行时为准。 因此电脑上必须装有官方 ChatGPT 桌面版,但不需要登录 ChatGPT 或 Codex 账号。 它给模型的工具很少。常见的电脑操控方案会把截图、点击、输入、滚动各做成一个工具,LCU 只给两个:js 和 js_reset。 js 用来执行一段 JavaScript 代码,运行环境里预置了一个名为 cua 的对象。模型通过写代码来操作电脑:先调用 cua.getState() 拿到当前桌面状态和使用说明,再用 getApp 选定某个窗口,然后调用 click、typeText、pressKey、getScreenshot 等方法。点击、输入、读取结果可以写在同一段代码里,一次调用完成。 这个 JavaScript 环境会保留状态,上一次调用里定义的变量,下一次还能接着用;环境出问题时调用 js_reset 清空重来。除了截图,模型还能读取窗口的无障碍信息(操作系统提供给读屏软件的界面元素列表),按元素点击,不必完全依赖屏幕坐标。 js 加 cua 对象这套接口是 OpenAI 原版的设计,LCU 原样转发。仓库记录显示,在 macOS 上对比测试时,模型收到的初始化说明和首次调用返回的使用指南,与官方 Codex 收到的内容逐字节一致。 目前正式适配的 Agent 工具是 Pi、Codex CLI 和 Claude Code,Oh My Pi 和 Hermes 为实验性支持。系统支持 Apple Silicon 芯片的 macOS(需授予辅助功能和屏幕录制权限),以及使用 X11 桌面的 Linux(ARM64 和 x86-64)。Windows 11 尚在候选阶段,Intel Mac 和 Wayland 桌面不支持。 控制 Chrome 浏览器需要额外开启,走的是 OpenAI 官方 Chrome 扩展,每个网站仍需单独批准。安装需要 Python 3.12 以上,README 给出的做法是把一段提示词贴给自己的 Agent,让它按安装文档完成配置,也可以从 GitHub 手动下载安装包。 项目地址: github.com/amontlabs/lcu

Industry Coordinates & Source Verification

This report is categorized under AITOP's "How-to" desk, focusing on US frontier AI labs and Silicon Valley technology leaders. Within our cross-regional analytical framework, it directly maps to AI developer toolchains, coding agents, and engineering workflows. Key entities and technical topics under continuous tracking include Codex, Claude Code, Computer Use, MCP and tools.

Source attribution: curated from 宝玉 (@dotey). Cross-source corroboration: 11 independent sources have covered this development (including Gorden Sun, IT之家, Clement Delangue), confirming industry-wide signal strength.