Skip to content
Documentation
- OverviewBackground Mac computer control for AI agents: chain actions, read once with a filter, and verify cleanup.
- How computer use worksEvery agent step re-reads the conversation available to that agent. Put screen work in a small, fresh context and bundle predictable actions so it takes fewer steps. The main session frames the task, checks saved evidence, and reports the result; a cheap helper or desk-runner performs the app work. When no cheap helper is available, the runner handles every native app task.
- GuidesEvery agent step re-reads its conversation. Keep native app work in a fresh, small context and bundle predictable actions to reduce repeated context reads. A runner is a fresh subagent that performs the app actions. The main session frames the task and verifies evidence; the runner performs the screen actions. Use a cheap helper or desk-runner; use the runner for all app work when a cheap helper is unavailable. The driver is cua-driver, the background app driver from trycua/cua.
- CommandsThese Python tools keep native Mac app actions in one small helper context. They resolve a bundle id to a process and usable window, inject those ids, save the full driver response, and return a short result. Python uses only its standard library. Native app control requires macOS, CuaDriver.app, cua-driver, osascript, Accessibility permission, and Screen Recording permission.
- ProofPackage receipts include the command, measurement date and expiry in proof/results.json. They measure the package and synthetic fixture. Regenerate them from a source checkout with npm run proof after running the checks. The npm package includes the receipts and proof scripts; regeneration uses the source checkout's test suites and fixtures.
- ChangelogAll notable changes to this project are documented here. The format follows Keep a Changelog, and the project uses Semantic Versioning.
- InstallUse Node >=22 to run the installer. Native app control needs macOS, Python 3 and the separately installed cua-driver. Follow the driver precautions before granting system permissions.
- GuaranteesThe optional hooks help a runner stop a repeated error, combine small actions and end the processes it leased. Install their registrations with npx lean-computer-use --with-hooks. The installer merges settings-snippet.json into the selected Claude Code settings file, substitutes the installed hook folder for __HOOKS_DIR__, and marks the entries lean-computer-use. Uninstall removes those marked entries while preserving other settings.