lcu

amontlabsMIT活跃维护

把 Codex 的电脑操作能力从原应用中解耦出来,做成可嵌入任意 harness 的库,让 Agent 能跨平台控制桌面和浏览器。

Codex computer use, decoupled from the app, for usage inside any harness.

v0.13.5发布于 2026-11-01 16:42 UTC2,407star +11 / 7 天161fork同步于 2026-11-10 23:45 UTC

怎么上手

由 README 提炼,执行前请确认
claude plugin marketplace add amontlabs/lcu
claude plugin install lcu@lcu
硬件要求按 README 说明

需先安装官方 ChatGPT 桌面应用,LCU 复用其内置 Node 运行时,无需 Python。支持 Apple Silicon macOS(需辅助功能与录屏权限)和 Ubuntu 24.04 兼容的 Linux ARM64/x86-64(需 X11 桌面与 D-Bus)。Windows 11 x64 仍为候选,Intel Mac、原生 Wayland、musl Linux 不支持。

支持 Apple Silicon
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

把 Codex 的 computer use 运行时从 Codex 应用里解耦出来,让任意 harness 都能调用

把 Codex 的电脑操作能力从原应用中解耦出来,做成可嵌入任意 harness 的库,让 Agent 能跨平台控制桌面和浏览器。

核心能力

  • 读取窗口、点击、输入并截图控制桌面应用
  • 通过官方扩展读取和控制 Chrome 标签页,站点需审批
  • 提供 Pi、Codex CLI、Claude Code 适配器
  • 用 Touch ID 管理已批准应用列表,可随时撤销
  • 可选跨轮次保持 Computer Use 会话可用

容易踩的坑

必须先本地安装官方 ChatGPT 桌面应用,LCU 本身不含运行时;安装器不会把 lcu 加入 PATH,需用安装路径如 /opt/lcu/current/bin/lcu;Chrome 控制需手动启用官方扩展并重启 Chrome 与 harness,Claude Code 的 Chrome 支持仍属实验性。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v0.13.5
  1. v0.13.5LCU 0.13.5最新正式版2026-11-01 · 2026-11-01 16:42 UTC

    LCU 0.13.5

    Keeps the Windows candidate installing on current ChatGPT app builds, which are now webpack bundles.

    Changes

    • Windows candidate: native-pipe host extraction from webpack builds. From OpenAI.Codex 26.1027.3384.0 the app has no main*.js, and the host factory sits inside the module that starts the app, so the installer stopped with no host factory found. LCU now finds the factory by its content, extracts it from that module, and runs it on a runtime derived from the app's own entry, without starting the app. The installer loads the written host once with Electron blocked and stops if that fails, so a host that cannot load is caught at install, not at first use. Earlier app builds keep working. Windows stays a candidate: this was checked on the official Windows and Linux bundles from macOS, not on a live Windows desktop (#82, #83, thanks @Xiao1804 for the detailed report).

    Upgrading

    macOS and Linux behave as before; run lcu update if you want to stay current. To go back, reinstall 0.13.4.

    Downloads

    ArchiveSHA-256
    lcu-0.13.5-darwin-arm64.tar.gza05fa40ea53771b895b4609ef382d1afabe98a4c3050c857becc11e759c5430b
    lcu-0.13.5-linux-arm64.tar.gze3465dd0afc340de7e1fafa79872b1e7ca5d43d1a2b8d77f2a38763d7759b3f7
    lcu-0.13.5-linux-x64.tar.gz5dd0893d7298261f8a03f6ceadecf42be848fba2d1f0585db05b4e5e927435bf

    Each archive has a matching .sha256 file; check it with shasum -a 256 -c.

  2. v0.13.4LCU 0.13.42026-10-29 · 2026-10-29 10:15 UTC
    查看更新说明

    LCU 0.13.4

    Keeps the Claude Code approval mod free of machine-specific paths, so a skills folder kept in a repository stays clean.

    Changes

    • Claude Code: no lcu.json for a default install. lcu setup --agent claude-code wrote lcu.json beside the lcu-approve mod with the absolute path of the lcu command, which tied a skills folder kept under version control to one account and left a diff on every other machine. The mod already falls back to $HOME/.local/share/lcu/current/bin/lcu, so setup now writes lcu.json only when that fallback would not find this installation (a custom prefix, or $HOME unset), and removes an earlier one otherwise (#71, #72, thanks @km-tr for the report).

    Upgrading

    Run lcu update, then restart Claude Code; the update refreshes the mod at ~/.claude/skills/lcu-approve. If you set up Claude Code with --scope project, run lcu setup --agent claude-code --scope project again. To go back, reinstall 0.13.3.

    Downloads

    ArchiveSHA-256
    lcu-0.13.4-darwin-arm64.tar.gzf7cab7dcc9ecca1743a219c0629799d1f68f5dd5b914595837b4765f73890bb4
    lcu-0.13.4-linux-arm64.tar.gz40708c34df5b5cdd54c16f632495d91c0b371e7d7c6aeb9ad45aaa9fa782e93d
    lcu-0.13.4-linux-x64.tar.gz674e6c265f35dd25edb2f48cc2a07e8243a38368dd0b4050dc5792cffbd3e378

    Each archive has a matching .sha256 file; check it with shasum -a 256 -c.

  3. v0.13.3LCU 0.13.32026-10-28 · 2026-10-28 18:51 UTC
    查看更新说明

    LCU 0.13.3

    Installs the Claude Code approval mod when ~/.claude/skills is a symlink, and keeps LCU's update notices working in Team and Enterprise organizations.

    Changes

    • Claude Code: the approval mod installs through a linked skills folder. When ~/.claude/skills (or a project's .claude/skills) was a symlink, for example into a dotfiles repository, lcu setup --agent claude-code refused to write the lcu-approve mod and reported it as an MCP failure. Setup now follows that folder to its real path once; it still refuses a link at the mod folder itself or inside it. A failed mod install is now reported as its own approval mod step, after the MCP server is registered, and the approval mode still applies (#67, #69, thanks @km-tr for the report).
    • Claude Code: update notices in Team and Enterprise organizations. In those organizations Claude Code's built-in guard (cc-plugin-sec-default@builtin) skips the classic.* hooks of mods a person installs. The mod's update notices now run on session.start and prompt.submit, which the guard does not skip. The mod's approval pane still needs classic.Elicitation, the only event Claude Code has for an MCP elicitation, so in those organizations approvals use Claude Code's own form instead. ADAPTERS.md describes what works there. Not run in an organization account (#68, #69, thanks @km-tr for the report).

    Upgrading

    Run lcu update, then restart Claude Code; the update refreshes the mod at ~/.claude/skills/lcu-approve. If setup failed on a linked skills folder before, or you set up Claude Code with --scope project, run lcu setup --agent claude-code again (with the same scope). To go back, reinstall 0.13.2.

    Downloads

    ArchiveSHA-256
    lcu-0.13.3-darwin-arm64.tar.gz32d04eeaf9cf8d07455039d5b1e1df0624ad2e65dc7df7955b9f7496a3bc4782
    lcu-0.13.3-linux-arm64.tar.gz5ba46a0987c7aeaa19a5a15638410e7354ae931657a479b13a30ab5089c4d97c
    lcu-0.13.3-linux-x64.tar.gze48b7c6952047f5f9c146163982076e6412d47ffdd0f5c77548dc752b670655f

    Each archive has a matching .sha256 file; check it with shasum -a 256 -c.

  4. v0.13.2LCU 0.13.22026-10-28 · 2026-10-28 08:56 UTC
    查看更新说明

    LCU 0.13.2

    Stops the "Stop hook error" Claude Code shows on every turn when LCU's MCP server is not connected, and lets Pi-Bolt compile LCU into Pi.

    Changes

    • Claude Code: no hook errors when LCU is not connected. LCU's Claude Code lifecycle hooks were mcp_tool hooks on the lcu server. When that server failed to connect, for example after a startup timeout, Claude Code reported each of them as an error, so every turn ended with Stop hook error: MCP server 'lcu' not connected, even in sessions that never used Computer Use. Reproduced with Claude Code 2.1.311. The PreToolUse, Stop, StopFailure and SubagentStop hooks are now command hooks. They run a small helper that setup copies to ~/.local/share/lcu/claude/claude-hook.mjs (Windows: AppData\Local\LCU\claude\). The helper reaches the running relay over a private lifecycle channel, and exits silently when no relay is running. When the relay is connected, turn binding and cleanup work as before: a turn is bound before js runs, and Stop, StopFailure and SubagentStop clean up the same turns and subagents. The relay waits for that channel before it offers Claude its tools, at most two seconds after the original server is ready. If the channel cannot start, Computer Use calls say so instead of failing with a missing identity. Checked with the real Claude Code CLI against a scripted API, both with no relay and with a connected relay; native Windows and the macOS desktop were not run. The separate 30-second connection timeout in the report is not changed by this; setting MCP_TIMEOUT=60000 gives the server more time (#64, #66, thanks @valkyriweb for the report).
    • Pi: Pi-Bolt compiles LCU in. On macOS and Linux, the Pi extension LCU writes to ~/.local/share/lcu/pi/extension.mjs now imports the adapter by its plain path instead of a file:// URL. pi-bolt compile does not follow a file:// import, so it left LCU interpreted on every start. Stock Pi loads both forms, and the Windows wrapper is unchanged (#65, thanks @KorenKrita for the fix).

    Upgrading

    Run lcu update, then restart your agents. The update replaces LCU's Claude Code hooks in your user settings. If you set up Claude Code with --scope project, run that lcu setup again in each project. For Pi, run lcu setup --agent pi again to rewrite the extension.

    To go back, reinstall 0.13.1 and run its lcu setup --agent claude-code again to restore its hooks.

    Downloads

    ArchiveSHA-256
    lcu-0.13.2-darwin-arm64.tar.gzb897b3def16f0048d90391d43a3da4b940b92a4be15738db96ee31cf8137bc59
    lcu-0.13.2-linux-arm64.tar.gzd86881cb1df3a4c95d96f289b78eb2f6feaee3c6ee6513bd8f15e23f030a7597
    lcu-0.13.2-linux-x64.tar.gzdd6e926cb5ded9b67c87c2dec2d2333167c062336937c370fd27f79ff22381bf

    Each archive has a matching .sha256 file; check it with shasum -a 256 -c.

  5. v0.13.1LCU 0.13.12026-10-25 · 2026-10-25 13:58 UTC
    查看更新说明

    LCU 0.13.1

    Fixes LCU in Claude Code agent-team teammates, and gives Junie on macOS the instructions on its first prompt.

    Changes

    • Claude Code agent-team teammates. A teammate in the tmux or iTerm2 backend is a separate Claude Code process whose turns start from its inbox, so its hooks carry no prompt id, and every js and js_reset call failed with "Missing exact Claude PreToolUse identity". The relay now uses a turn id of its own for such a turn, replaced when the teammate's Stop or Interrupt ends it, so Computer Use still ends with the turn by default. Session and tool-use ids are still required exactly. Verified with a tmux teammate on macOS with Claude Code 2.1.310: its hooks had no prompt id and it sent Stop after each inbox turn (#62, thanks @hangox for the fix).
    • Junie on macOS: instructions on the first prompt. Junie CLI 26.10.20 on macOS starts LCU's relay only after a session's first prompt hook, so a headless junie --task run never got the original instructions and an interactive session got them only on its second prompt. A session's first call result now carries them once, before the result. On Linux, where the relay starts early, they still come with the prompt. lcu setup --agent junie --approval ask also removes the containers LCU's rules leave empty in ~/.junie/allowlist.json, and the file itself when nothing else is left (#61).

    Upgrading

    Run lcu update, then restart your agents. To go back, reinstall 0.13.0.

    Downloads

    ArchiveSHA-256
    lcu-0.13.1-darwin-arm64.tar.gza8c75bed3ea85d22427ab3a39bb8498082f2199548630f14411cc82758dc2f33
    lcu-0.13.1-linux-arm64.tar.gze96c2c1bd3943a1e797c46876ad16d18a0716232d1de83e37c49c9a6db45ee44
    lcu-0.13.1-linux-x64.tar.gzb853834cb013de0c2b63e0bbca9a30a99cd53e5a7ff41b740b353cbe51ef1cb8

    Each archive has a matching .sha256 file; check it with shasum -a 256 -c.

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    https://github.com/user-attachments/assets/bd9d0809-8a6c-4931-a51c-b98daf05cb5f

    LCU exposes Codex's original computer-use runtime to your harness without requiring Codex authentication. The official ChatGPT desktop app must still be installed locally: it supplies the runtime and instructions, while LCU handles setup and harness integration.

    Quick start

    Copy this into your agent:

    Install and configure LCU for this harness using the latest release.
    Follow https://raw.githubusercontent.com/amontlabs/lcu/main/docs/INSTALLATION.md
    Check my OS, architecture, and prerequisites, then guide me through any required permissions.
    

    In Claude Code on an Apple Silicon Mac, two commands do the same through its plugin manager; see Claude Code plugin:

    claude plugin marketplace add amontlabs/lcu
    claude plugin install lcu@lcu
    

    Features

    • Desktop apps: read windows, click, type, and take screenshots.
    • Chrome, when enabled: read and control tabs through the official extension, with site approval.
    • In your harness: adapters are available for Pi, Codex CLI, and Claude Code, with experimental Oh My Pi, Hermes, DeepSeek Harness and Junie integrations. With Junie, app approvals are permanent until revoked: Junie cannot show LCU's per-app prompt, so it runs lcu apps allow <App> itself and each approval lasts until lcu apps revoke <App>. See setup and verification limits.

    Approve apps from Claude, natively

    The first time an agent controls an app (Zed, Notes, Safari), the computer-use runtime asks you to allow it. The Claude app's Code tab used to fail that request with "Computer Use was not approved". lcu setup --agent claude-code now installs a small Claude Code mod, lcu-approve, that asks the question natively: as a question card in the Claude app, which flags the session as needing input, and as a Computer use approval pane in the terminal.

    • Allow this conversation for the current chat only.
    • Always allow to remember the app (offered only when the runtime allows it).
    • Deny to refuse.

    The /computer-use-apps command opens an Approved apps panel in the same place: one line per always-allowed app with Revoke (macOS asks for Touch ID or your password), apps that are no longer installed grouped below, this conversation's grants, and an Allow field.

    Only you can answer: the model cannot see, press or fake the pane. High-risk apps show the runtime's own warning (reworded to say "computer use" and "the agent"), and the app hosting the agent is never approved. Needs the Claude app or Claude Code 2.1.287+. How it works, how to remove it.

    In the Claude app, register LCU through Claude Code (lcu setup --agent claude-code), not through Settings > Connectors; see installation.

    Manage approved apps with Touch ID

    "Always allow" is remembered. Review and change that list from the terminal (macOS), without opening the Codex app:

    lcu apps                 # what is always allowed today
    lcu apps allow Zed       # Touch ID (or your password), then Zed is allowed
    lcu apps revoke Zed      # take it back
    
    • Pass an app name, a bundle identifier or an .app path.
    • Listing is free; allow and revoke need you at the machine, so an agent running them is stopped by the prompt.
    • Running sessions pick the change up immediately.
    • Browsers, password managers and other high-risk apps come with a warning; apps Computer Use refuses outright (Terminal, iTerm2) are declined.

    Details.

    Keep Computer Use across turns (Claude Code)

    In Claude Code, Computer Use normally ends with the turn that started it. A background subagent still working after that turn ended, or a turn that reuses an ended turn id, is told "Computer Use is unavailable because the current turn ended." An opt-in setting keeps it available for every turn of the session:

    lcu cross-turn           # status
    lcu cross-turn on        # Touch ID (or your password) on macOS
    lcu cross-turn off       # no prompt
    
    • Off by default. lcu setup --cross-turn on|off sets it too; interactive setup asks once.
    • It affects only the Claude Code relay; Codex, Pi, Oh My Pi and Hermes ignore it. Per-app approvals (macOS and Windows) and your harness's tool approvals still apply.
    • A foreground subagent finishing no longer ends the parent's Computer Use, with the setting on or off.
    • A guard against accidents, not a security boundary: anything running as your account can edit the file or pass --unattended (for disposable sandbox machines, where nobody can answer the prompt).

    Details.

    Permissions

    Your harness decides whether the agent may call LCU's tools (Claude's "don't ask again" on the first card, Codex's tool approval, and so on). LCU decides, per app, whether that agent may touch it, in every permission mode. lcu setup --approval auto is optional and meant for unattended machines (VMs, CI): it pre-allows LCU's two model tools in the harness, and leaves per-app approval in force. See approval mode.

    Requirements

    Install the official ChatGPT desktop app and your harness first. LCU needs nothing else: no Python on any platform. It runs on the Node that ships inside the app, checks the installed app for compatibility and uses its original runtime. For Codex CLI, update before setup to get the required hook support.

    PlatformRequirements
    Linux ARM64 or x86-64Ubuntu 24.04-compatible glibc system, an active X11 desktop, and D-Bus
    macOS on Apple SiliconThe signed ChatGPT app, with Accessibility and screen-recording permissions approved during first use

    Windows 11 x64 remains a candidate. Intel Macs, native Wayland, and musl Linux are unsupported. See verification and limits for tested behavior.

    Install manually

    Download the archive and matching .sha256 file from the latest release:

    PlatformArchive
    macOS on Apple Siliconlcu-<version>-darwin-arm64.tar.gz
    Linux ARM64lcu-<version>-linux-arm64.tar.gz
    Linux x86-64lcu-<version>-linux-x64.tar.gz

    Follow the installation guide to verify the checksum, extract the archive, and register LCU in your harness. Setup offers an agent chooser and desktop-readiness guidance. Chrome and computer-audio recording are opt-in.

    For development, see building from source.

    Enable Chrome

    Ask your agent:

    Enable Chrome control in my LCU setup using the installation guide:
    https://raw.githubusercontent.com/amontlabs/lcu/main/docs/INSTALLATION.md#desktop-and-browser
    

    Enable the official extension in your Chrome profile and restart your harness. Then restart Chrome, or turn the ChatGPT extension off and on in chrome://extensions; an extension that was already connected keeps the original native host until it reconnects. Then ask your agent to use LCU to list Chrome tabs. Sites still require approval. Claude Code's Chrome support remains experimental because some interruptions do not trigger tab cleanup; see adapter limitations. If Chrome calls fail with requires caller identity, see Chrome troubleshooting.

    Enable computer-audio recording

    Pass --audio when setting up a maintained harness, for example:

    ~/.local/share/lcu/current/bin/lcu setup --agent pi --audio
    

    The installer does not add lcu to your PATH; run its installed path (/opt/lcu/current/bin/lcu on Linux). See the lcu command.

    This enables the installed original runtime's optional computer-audio recording API and its original approval flow. LCU does not add audio-specific instructions, and a saved recording is not audio delivered to the model. See the audio opt-in verification record.

    Pi commands

    In interactive Pi, /lcu stop requests original Computer Use Stop for a selected app during the active LCU turn (macOS only). /lcu pick selects an original app or browser target and appends it to the editor draft while Pi is idle; review and submit the draft yourself. See adapter command behavior and limits.

    Documentation

    • Installation: downloads, harness setup, permissions, sessions, and upgrades. Update with lcu update; update notices can be turned off with LCU_NO_UPDATE_CHECK=1.
    • Harness adapters: custom clients, approvals, lifecycle, and result handling.
    • Verification: tested behavior and remaining gaps.
    • Development: source builds and isolated desktop tests.

    LCU is MIT licensed. Release archives contain LCU and third-party setup dependencies. The OpenAI app and its instructions come from your local installation and retain their own terms; see dependency provenance.