macOS Harness ⌘
The simplest, thinnest harness that gives an LLM complete freedom to complete virtually any task on a Mac.
The agent writes what is missing, mid-task. No framework, no recipes, no rails. One Python process connected directly to macOS, your real browser, and your files.
● agent: wants to do something no helper exists for
│
● sees the app and uses raw macOS primitives
│
● writes the missing logic in ordinary Python
│
✓ task complete no app-specific tool added
Your agent now has a Mac.
Give it to your agent
Paste this into Codex or Claude Code:
Install or upgrade macOS Harness from https://github.com/browser-use/macos-harness with uv using Python 3.12. Register the skill printed by `macos-harness skill`, then run `macos-harness doctor`. Explain any missing macOS permissions and ask before requesting them. Finally, verify the harness by capturing one already-running app without bringing it to the foreground.
That is it. The agent installs the package, teaches itself the workflow, checks permissions, and verifies the connection. Manual setup is available too.
Six primitives. The whole Mac.
macos-harness <<'PY'
frame = mac.see("Spotify")
mac.key("cmd+k", app="Spotify")
mac.type("Alessia Cara", app="Spotify")
mac.click(640, 420, app="Spotify")
item = mac.ax.at(640, 420, app="Spotify")
mac.script('tell application "Spotify" to play')
print(browser.page_info())
print(list(Path.home().iterdir()))
PY
Think in see, key, type, click, ax, and script. browser, Path, and
subprocess are ready in the same Python process.
There are no Spotify tools, Slack tools, or Final Cut tools. The model gets raw primitives and writes the rest.
How it works
one persistent Python process
│
┌──────────────────────┼──────────────────────┐
│ │ │
mac.* browser.* Path / subprocess
│ │ │
┌───────────┼───────────┐ Browser Harness files + shell
│ │ │ │
CGWindow CGEvent AX + Apple CDP
screenshots to PID Events │
│ │ │ real Chrome
└───────────┴───────────┘
│
native + Electron apps
- Captures background app windows without bringing them forward
- Sends keyboard and coordinate input directly to an app PID
- Draws an animated, click-through pointer without moving your real cursor
- Exposes raw Apple Accessibility and Apple Events when vision is not enough
- Uses Browser Harness for the real, logged-in browser
- Keeps ordinary Python and the local filesystem within reach
Permissions and privacy
macos-harness doctor reports the macOS permissions actually needed. The harness
never activates or raises a target app and never moves the physical pointer.
Anonymous telemetry is enabled by default. It records only the CLI command category, success, duration, package version, OS/architecture, and detected agent client. It never records prompts, app names, screenshots, UI text, scripts, paths, or window titles.
macos-harness telemetry disable
Experimental. macOS only. MIT licensed.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file macos_harness-0.1.2.tar.gz.
File metadata
- Download URL: macos_harness-0.1.2.tar.gz
- Upload date:
- Size: 194.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49fac524fcfeda785d3383e4435e8f346833e3c9d7f1d36119b685e37e65f777
|
|
| MD5 |
db15f5aca66e01449393afee7a213d03
|
|
| BLAKE2b-256 |
94071788c5675666ea1b450b8efeb0d902f59db07eafebe95ce618dc0ac31f24
|
Provenance
The following attestation bundles were made for macos_harness-0.1.2.tar.gz:
Publisher:
publish.yml on browser-use/macos-harness
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
macos_harness-0.1.2.tar.gz -
Subject digest:
49fac524fcfeda785d3383e4435e8f346833e3c9d7f1d36119b685e37e65f777 - Sigstore transparency entry: 2498626706
- Sigstore integration time:
-
Permalink:
browser-use/macos-harness@b88e4d77403bbcac35752eef4f4dd72db3663fd6 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/browser-use
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b88e4d77403bbcac35752eef4f4dd72db3663fd6 -
Trigger Event:
release
-
Statement type:
File details
Details for the file macos_harness-0.1.2-py3-none-any.whl.
File metadata
- Download URL: macos_harness-0.1.2-py3-none-any.whl
- Upload date:
- Size: 30.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1904eb370bab86f4a66a9d1a571f8234ad5ca9abb9f8df769db56af6ea9d91f
|
|
| MD5 |
98077819eae149bea66385711b629110
|
|
| BLAKE2b-256 |
87f00d765e7438da1703a1fa79e2f4fbe45f17ffdb1e3d84b11fede3f8c930ab
|
Provenance
The following attestation bundles were made for macos_harness-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on browser-use/macos-harness
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
macos_harness-0.1.2-py3-none-any.whl -
Subject digest:
a1904eb370bab86f4a66a9d1a571f8234ad5ca9abb9f8df769db56af6ea9d91f - Sigstore transparency entry: 2498626723
- Sigstore integration time:
-
Permalink:
browser-use/macos-harness@b88e4d77403bbcac35752eef4f4dd72db3663fd6 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/browser-use
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b88e4d77403bbcac35752eef4f4dd72db3663fd6 -
Trigger Event:
release
-
Statement type: