Skip to main content

acuser

Give any terminal agent—or any agent with access to subprocess—full control of a macOS computer through a small, agent-friendly CLI.

acuser is a local macOS observation and control CLI for AI agents. It combines structured macOS APIs with mouse/keyboard control and screenshots as a visual fallback.

Install

For a normal user installation, use pipx:

pipx install acuser
acuser permissions

If you already manage your own Python environment, regular pip also works:

python3 -m pip install acuser

acuser supports macOS with Python 3.10 or newer. macOS may ask for Accessibility and Screen Recording permissions the first time a command needs them; those permissions normally persist after approval.

Install for development

python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e .

The package currently targets macOS and requires Python 3.10 or newer.

Agent guidance

The built-in agent guide is the canonical usage reference:

acuser agent-help
acuser agent-help --format json

The Markdown guide explains the observe → act → verify loop. The JSON form uses schema acuser.agent-command-catalog.v1 and is intended for wrappers, skills, and other agents that need to discover commands without parsing terminal prose.

Recommended agent loop

  1. Check access with acuser permissions.
  2. Establish context with acuser acclimate or query apps and windows.
  3. Focus the target application.
  4. Prefer Accessibility inspection and semantic clicks.
  5. Use coordinates only after resolving current window bounds.
  6. Use a screenshot when the UI is visual or Accessibility data is insufficient.
  7. Verify important actions with a fresh query or screenshot.

Never reuse stale coordinates after an app switch, scroll, window move, display change, or layout change.

Observation commands

acuser apps                         # app metadata, PIDs, bundle IDs, state
acuser apps --names                 # names only
acuser windows                      # window IDs, owners, titles, bounds
acuser inspect Safari --depth 3     # Accessibility tree
acuser dock                        # Dock geometry and ordered items
acuser permissions                  # macOS permission status
acuser acclimate --output /tmp/state.json
acuser state --input /tmp/state.json
acuser screenshot WINDOW_ID /tmp/window.png
# If vision identifies (1840, 1350) in that PNG:
acuser click --screenshot /tmp/window.png 1840 1350

All successful commands emit JSON except agent-help in its default Markdown mode. Coordinates are global macOS logical screen points. Screenshot pixels may be higher density and must be scaled before using them as click coordinates. The screenshot command writes a .png.json sidecar containing the captured window bounds, pixel dimensions, scale, and timestamp. Passing that PNG to click --screenshot performs the conversion and refuses to click if the target window has moved or resized since capture.

Control commands

acuser launch Arc
acuser focus Arc
acuser move 500 300
acuser click 500 300
acuser click --app Notes --title "New Note"
acuser type 'hello from an agent'
acuser press enter
acuser hotkey command l
acuser hotkey command+shift 4
acuser scroll -6
acuser scroll 3 --horizontal 2
acuser drag 400 300 900 600 --duration 0.8

click --app ... --title ... uses the macOS Accessibility API and is generally more stable than coordinate clicking. type uses paste-and-restore by default; --method events is a fallback for controls that reject paste. drag emits interpolated left-button drag events for gesture-sensitive controls.

Permissions

The process needs macOS Accessibility permission for cross-application inspection and control. Screen Recording permission may be required for window capture. These are granted in System Settings → Privacy & Security and normally persist after the first approval.

acuser permissions
acuser permissions --prompt

Safety model

Observation commands are read-only, except that acclimate writes a local state file and screenshot writes an image. Input commands can affect the active application and may submit forms, edit documents, send messages, or trigger external actions. Agents should identify the target, act deliberately, and verify the result. Do not expose passwords, tokens, or sensitive data in screenshots or typed command arguments.

Development checks

python -m py_compile acuser.py
acuser --help
acuser agent-help --format json

Metadata

Release files for acuser 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for acuser 0.1.1
File Interpreter ABI Platform
acuser-0.1.1-py3-none-any.whl Python 3 none any Details

Release files / acuser-0.1.1-py3-none-any.whl

Download URL acuser-0.1.1-py3-none-any.whl
Size 13.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aaf4329c5fabf5eab0b54f1e7be1bdb82911856231adaba1af6c685e975d4afa
BLAKE2b-256 checksum
How to use checksums
90284df9b4add1bc37f348bc98f5777f0a371dd64dfd5f1e5c404d52e63e78b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.5

Security for acuser 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page