Authorization notice. Lcu is dual-use. Only use it on software, sites and systems you own or have explicit permission to test.
Credentials. The agent can see and type into any app you approve, including apps that show saved credentials or private messages.
Who it is forA developer running Codex CLI on a Mac or Linux desktop who needs the agent to test or operate a GUI app that has no API.
The problemCodex CLI cannot interact with desktop windows by itself, so GUI-only steps need manual work.
The outcomeCodex CLI can read windows and take screenshots in a desktop app, and each app asks for approval before the agent touches it.
What you need first
- The official ChatGPT desktop app installed locally
- Your agent harness installed (Claude Code, Codex CLI, Pi, or another supported adapter)
- macOS on Apple Silicon, or Linux ARM64 or x86-64 with an active X11 desktop and D-Bus
- Accessibility and screen-recording permissions on macOS, approved during first use
Steps
- Update Codex CLI before setup, as the README requires for hook support.
- Download the archive for your platform and its matching
.sha256file from the latest release, then verify the checksum and extract it. - Run
~/.local/share/lcu/current/bin/lcu setup --agent codexfrom the installed path, since the installer does not addlcuto your PATH. (inferred, check the README) - Follow the setup prompts for desktop-readiness and permission guidance.
- Ask Codex CLI to list the windows of a named app and take a screenshot to confirm the connection. (inferred, check the README)
Prompt for your agent
Using the amontlabs/lcu repo, set up LCU for Codex CLI on this machine by following docs/INSTALLATION.md. Ask me to approve the desktop app named <app name>, then have the agent list its windows and take one screenshot. Report the setup result and confirm the screenshot was taken.
Caveat. The README asks for a Codex CLI update before setup, and Linux support requires an active X11 desktop because native Wayland is unsupported.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for amontlabs/lcu and "Give Codex CLI control of desktop apps on macOS or Linux"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer