Auny in a hood

lean-computer-use

Give Claude Code background control of native Mac apps, with saved reads and cleanup proof.

Mac app task App + done check Main session Task brief desk-runner Background app Saved read Cleanup check
npx lean-computer-use
Star on GitHub

Mac app taskMain session writes the app, actions and done check.

Main session frames the task
  • desk-runnerCalculator in the background

  • Saved readFull evidence in a file

  • Main sessionCheck value and cleanup

A fresh desk-runner handles one native Mac app task.
Example from the README: enter a value in Calculator.

What this does

Silent video

Get started

Go from install to your first Mac app task.

  1. Run the installer

    Prepare the upstream driver and run npx lean-computer-use doctor.

  2. Start a fresh Claude Code session

    Ask it to use the lean-computer-use skill.

  3. Give the AI a bounded app task

    Name its done signal and check the saved result and cleanup.

npx lean-computer-use

npx lean-computer-use doctor

npx lean-computer-use install --with-hooks

Preview the plan first with --dry-run.
Read the complete installation guide

Requirements

Claude Code

The supported host discovers the installed skill and runner in a fresh session.

macOS

Native app control runs on macOS.

Python 3

The desk tools use Python.

Node 22 or newer

The installer, doctor and transcript measurement run on Node.js.

cua-driver

Install the upstream driver and review its permission guidance.

Give the agent one clear app task.

Define the target Mac app, the work to do and the result to check.

How computer use works here

Let a fresh runner use the app.

The runner is a fresh subagent that performs the app actions and saves an app read for inspection.

Meet the desk commands

Check the saved read and the cleanup.

Inspect the evidence, confirm the result and check the cleanup proof.

See the evidence

Docs and guides

  • desk, desk-read, desk-cleanRun, read and clean up a Mac app.
  • Task briefDefine the app task and the done check.
  • measure and doctorCheck your setup and your own token use.
  • Retry guard and batch hintStop repeated native errors and group actions.
  • Overview
  • How computer use works
  • Proof
  • Install
  • Common questions
    How do I use computer use on a Mac in the background?

    Use desk for background keys, then chain predictable actions in one call with desk <bundle> <tool> '<json>' && desk <bundle> <tool> '<json>' && desk-read <bundle> '<filter>'. Test one action first, then verify the saved read and run desk-clean <bundle> --app-name <Name>; add --launched-by-run only when this run opened the app.

    What is cua-driver and how do I check its permissions?

    Run npx lean-computer-use doctor to check cua-driver permissions and get fixes. Review the upstream source and verify the app with docs/cua-driver-install.md before granting permissions.

    How do I reduce tokens when an AI agent controls Mac apps?

    Use a fresh desk-runner, one chained desk call and one filtered desk-read to keep app work in a small context. Choose one case-insensitive substring shared by the wanted lines; use two reads when two fields share none. Open each saved full read to inspect any other line. Run npx lean-computer-use measure on your own transcripts to check the result.

    How do I measure main-session and subagent tokens?

    Run npx lean-computer-use measure --json. The report separates both groups and deduplicates assistant message ids.

    How do I install the optional retry hook for native app errors?

    Run npx lean-computer-use install --with-hooks and review the settings change. The retry hook blocks the third identical error attempt; the installer backs up the settings file and preserves unrelated registrations.

    How do I keep my edited skill when uninstalling?

    Run npx lean-computer-use uninstall --dry-run to review the plan. Uninstall preserves an owned file whose hash differs from the installed copy and reports it for manual review.

Evidence you can inspect

75937 bytes
Packed package sizeMeasured 2026-11-10 · Expires 2027-02-08
67 files
Packed file countMeasured 2026-11-10 · Expires 2027-02-08
0 packages
Runtime dependenciesMeasured 2026-11-10 · Expires 2027-02-08
300 cases
Node test cases passedMeasured 2026-11-10 · Expires 2027-02-08
189 cases
Python test cases passedMeasured 2026-11-10 · Expires 2027-02-08
200 tokens
Fixture main median (test fixture)Measured 2026-11-10 · Expires 2027-02-08
11 exit codes
Documented desk exits coveredMeasured 2026-11-10 · Expires 2027-02-08

Dated package measurements and checks you can inspect in the repository. Read the guarantees for workflow support, runner boundaries and failure behavior. The token median is a test fixture. Measure your own transcripts to check your tasks.

Releases

npm latest 0.1.6 ↗

v0.1.6

lean-computer-use 0.1.6

  • Cache the launched app name during desk resolution so desk-clean --launched-by-run can quit a run-opened app without a duplicate --app-name flag.
  • Include desk-reap in native Bash command detection for measure and optional hooks.
  • Speed up privacy hash checks and website verification so full test and proof runs finish within budget, and handle case-insensitive filesystems when checking AGENTS.md and agents.md in live website builds.

Read release notes on GitHub ↗

v0.1.5

lean-computer-use 0.1.5

  • Check project links by parsed host and path.
  • Record current repository security and release tag protections.
  • Linux test jobs run on GitHub-hosted runners.

Read release notes on GitHub ↗

v0.1.2

lean-computer-use 0.1.2

  • PostToolUse touch hook records native desktop actions and successful releases per session and subagent.
  • Stop and runner SubagentStop gate requests the release once per held stretch, with the exact release tool and the keep command.
  • keep --reason command holds desktop control for the user, including the session's subagents.

Read release notes on GitHub ↗

v0.1.1

lean-computer-use 0.1.1

  • cleanup command: dry run by default, --apply ends only leased processes, children first, with SIGTERM, a 3 second wait, then SIGKILL for the same process. It prints one summary line.
  • spawn command and desk/desk-reap: start a helper detached and record a lease; desk leases the driver daemon it starts.
  • Cleanup hooks for SubagentStop (desk-runner), Stop and SessionEnd, registered by install --with-hooks and removed by uninstall; each exits 0 on every path.

Read release notes on GitHub ↗

v0.1.0

lean-computer-use 0.1.0

  • Native Mac app skill, focused methods, runner agent and desk brief.
  • Background desk tools, retry guard and batching hint.
  • Installer, owned-file uninstall, environment doctor and transcript measurement.

Read release notes on GitHub ↗

Full version history