# lean-computer-use

Source: https://aunysillyme.dev/projects/lean-computer-use/

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

[npm](https://www.npmjs.com/package/lean-computer-use) [Docs](https://aunysillyme.dev/projects/lean-computer-use/docs/)

v0.1.6 · Controls native Mac apps · Runs in the background · Saved reads · Cleanup proof · MIT licensed

`npx lean-computer-use`

[Star on GitHub](https://github.com/aunysillyme/lean-computer-use)

## What this does

[lean-computer-use trailer](https://res.cloudinary.com/dvmejdq3j/video/upload/v1795852083/aunysillyme.dev/lean-computer-use-trailer-webm.webm)

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](https://aunysillyme.dev/projects/lean-computer-use/docs/install/)

**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](https://aunysillyme.dev/projects/lean-computer-use/docs/how-it-works/)

### 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](https://aunysillyme.dev/projects/lean-computer-use/docs/commands/)

### Check the saved read and the cleanup.

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

[See the evidence](https://aunysillyme.dev/projects/lean-computer-use/docs/proof/)

## Docs and guides

- [desk, desk-read, desk-clean Run, read and clean up a Mac app.](https://aunysillyme.dev/projects/lean-computer-use/docs/commands/)
- [Task brief Define the app task and the done check.](https://aunysillyme.dev/projects/lean-computer-use/docs/guides/)
- [measure and doctor Check your setup and your own token use.](https://aunysillyme.dev/projects/lean-computer-use/docs/commands/)
- [Retry guard and batch hint Stop repeated native errors and group actions.](https://aunysillyme.dev/projects/lean-computer-use/docs/guarantees/)
- [Overview](https://aunysillyme.dev/projects/lean-computer-use/docs/overview/)
- [How computer use works](https://aunysillyme.dev/projects/lean-computer-use/docs/how-it-works/)
- [Proof](https://aunysillyme.dev/projects/lean-computer-use/docs/proof/)
- [Install](https://aunysillyme.dev/projects/lean-computer-use/docs/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](https://github.com/trycua/cua) and verify the app with [docs/cua-driver-install.md](https://aunysillyme.dev/projects/lean-computer-use/docs/install/) 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.

[Measured results](https://aunysillyme.dev/projects/lean-computer-use/docs/proof/) [Guarantees](https://aunysillyme.dev/projects/lean-computer-use/docs/guarantees/)

## Releases

[npm latest 0.1.6 ↗](https://www.npmjs.com/package/lean-computer-use)

### Version history

- [`v0.1.6`](https://github.com/aunysillyme/lean-computer-use/releases/tag/v0.1.6) · 1 Dec 2026
- [`v0.1.5`](https://github.com/aunysillyme/lean-computer-use/releases/tag/v0.1.5) · 13 Nov 2026
- [`v0.1.4`](https://github.com/aunysillyme/lean-computer-use/releases/tag/v0.1.4) · 1 Nov 2026
- [`v0.1.3`](https://github.com/aunysillyme/lean-computer-use/tree/v0.1.3) · 1 Nov 2026
- [`v0.1.2`](https://github.com/aunysillyme/lean-computer-use/releases/tag/v0.1.2) · 30 Oct 2026
- [`v0.1.1`](https://github.com/aunysillyme/lean-computer-use/releases/tag/v0.1.1) · 28 Oct 2026
- [`v0.1.0`](https://github.com/aunysillyme/lean-computer-use/releases/tag/v0.1.0) · 26 Oct 2026

[Full version history](https://aunysillyme.dev/projects/lean-computer-use/versions/)

[agent-personalizer ↗](https://github.com/aunysillyme/agent-personalizer) · [model-orchestrator ↗](https://github.com/aunysillyme/model-orchestrator) · [repo-build-skill ↗](https://github.com/aunysillyme/repo-build-skill) · [website-build-skill ↗](https://github.com/aunysillyme/website-build-skill) · [lean-browser-use ↗](https://github.com/aunysillyme/lean-browser-use) · [decompose ↗](https://github.com/aunysillyme-dev/aunx-decompose) · [aunx-skills ↗](https://github.com/aunysillyme-dev/aunx-skills)

[Full changelog](https://aunysillyme.dev/projects/lean-computer-use/docs/changelog/) [File an issue](https://github.com/aunysillyme/lean-computer-use/issues/new/choose) [Credits](https://github.com/aunysillyme/lean-computer-use/blob/main/CREDITS.md) [Upstream driver](https://github.com/trycua/cua) [AunySillyMe](https://aunysillyme.dev/) [View on GitHub](https://github.com/aunysillyme/lean-computer-use) [2cf58b0](https://github.com/aunysillyme/lean-computer-use/commit/2cf58b055c2884581c6a27dbfd42c4c939e49897)
