Cua Docs

Drive your first app

Install Cua Driver, connect your agent, and ask it in plain English to drive a desktop app in the background on macOS, Windows, or Linux.

Drive your first app

You do not type Cua Driver CLI commands by hand. Cua Driver is a backend that an agent harness (Claude Code, Codex, Hermes, and others) drives for you. In this tutorial you install Cua Driver, connect your agent, and ask it in plain English to open a calculator and read a result back. Works the same on macOS, Windows, and Linux.

1. Install Cua Driver#

Use the same one-line installer on every platform; it picks the right path for the host and needs no administrator access.

Requires macOS 14 (Sonoma) or later.

/bin/bash -c "$(curl -fsSL https://cua.ai/driver/install.sh)"

Start the daemon through the app bundle so macOS attributes permission prompts to CuaDriver.app. This is what makes the TCC grant stick to the driver:

open -n -g -a CuaDriver --args serve

Then grant Accessibility and Screen Recording:

cua-driver permissions grant

Full install steps, PATH setup, and permission details live in the install guide. See Install Cua Driver.

2. Verify it is working#

Before you hand control to an agent, confirm the driver can see your desktop. Run the cross-platform probe:

cua-driver doctor

Then list the running GUI apps the driver can reach:

cua-driver call list_apps

If you see your running apps listed, the plumbing works. That is the only CLI you run by hand; from here the agent does the driving.

3. Connect your agent#

Register Cua Driver with your agent harness once.

Install the Claude Code skill. This is turnkey: the skill teaches Claude Code how to drive apps through Cua Driver, and you then ask in plain English.

cua-driver skills install

Prefer plain MCP instead of the skill? Print the Claude Code registration command:

cua-driver mcp-config --client claude

It prints a command you run to register the server (paths will be specific to your install):

claude mcp add-json cua-computer-use '{"args":["mcp","--claude-code-computer-use-compat"],"command":"/Users/you/.local/bin/cua-driver"}'

Using Cursor, Gemini/Antigravity, OpenCode, OpenClaw, or Pi instead? See Connect your agent.

4. Ask your agent#

You can now prompt your agent in plain English, and it will drive Cua Driver for you.

> Using the cua-computer-use MCP, open the Calculator, compute 6 × 7, and tell me the result.
 
→ launch_app Calculator
→ get_window_state
→ click 7 [element_index=12]
→ click × [element_index=20]
→ click 6 [element_index=11]
→ click = [element_index=22]
→ get_window_state
✓ The result is 42.

Everything runs in the background, and the agent picks the right calculator for your OS (Calculator on macOS and Windows, the system calculator on Linux), so the same prompt works on all three platforms.

To understand capture and delivery modes, see Capture and delivery modalities.

5. Confirm what happened#

The agent reports 42. Cua Driver kept the calculator in the background the whole time. It never stole your keyboard focus and never moved your cursor. That is best-effort background: the agent drives the app while you keep working. See Best-effort background.

What you did#

You installed Cua Driver, verified it could see your desktop, connected your agent harness, and asked in plain English for a result computed inside a real desktop app. The agent did the driving through Cua Driver, in the background, on your platform.

Next steps#

  • Connect your agent: register Cua Driver with Cursor, Antigravity, OpenCode, OpenClaw, Pi, and more.
  • Best-effort background: how Cua Driver avoids focus and cursor disruption when the target app supports it.
  • How-to guides: keep the driver running, update it, and more.