How macOS Harness Lets an LLM Write Code and Control Your Entire Mac
macOS Harness is an open‑source project that gives a persistent Python process to a large language model, exposing six primitive actions so the model can see the screen, type, click, read accessibility trees, run AppleScript, and write custom Python logic to automate virtually any macOS task.
macOS Harness, an open‑source project from the browser‑use team, aims to give a large language model (LLM) a persistent Python process that can perform almost any task on a Mac.
The system provides only six primitive operations: see, key, type, click, ax, and script. Using these primitives, the model can capture the screen, simulate keyboard input, type text, click coordinates, read the accessibility tree, and execute AppleScript. When a needed capability is missing, the model writes ordinary Python code to fill the gap, without relying on pre‑built toolkits.
A single long‑running process connects three components: mac. (operations such as screenshot, events, accessibility), browser. (a real, logged‑in Chrome instance), and ordinary Python files and shell commands. This architecture lets the model manipulate native macOS applications, control the browser, and read/write files or run commands.
Notably, macOS Harness can capture application windows in the background, keeping the target app off‑screen. Its virtual cursor is animated and click‑through, leaving the real mouse pointer untouched. Permissions required are reported by macos-harness doctor. Telemetry is enabled by default but only logs command type, success, duration, and version metadata, never screen contents, and can be disabled.
The project is currently experimental, macOS‑only, and released under the MIT license. To try it, paste the provided prompt into Codex or Claude Code; the system will install, register skills, check permissions, and verify the connection automatically, without any manual configuration.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
AI Engineering
Focused on cutting‑edge product and technology information and practical experience sharing in the AI field (large models, MLOps/LLMOps, AI application development, AI infrastructure).
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
