Skip to main content

acuser

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 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

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.

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.0

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

Source distribution (sdist)

Source distribution for acuser 0.1.0
File Size Uploaded Provenance
acuser-0.1.0.tar.gz 11.1 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 22.7 kB

Release files / acuser-0.1.0.tar.gz

Download URL acuser-0.1.0.tar.gz
Size 11.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ecfdd22c72e486537d98c294a40ce306e4b24369b772f48f597698074a30ebd0
BLAKE2b-256 checksum
How to use checksums
fd15b8940a76f2b55873649023f6cd602ebcdefa0320846a524ce77f3f45a710
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.5

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

Download URL acuser-0.1.0-py3-none-any.whl
Size 11.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2a9ccaecab21dd5e1fc77fea1dad884c1b097f58957c2ebb8e02ca87c3552f9
BLAKE2b-256 checksum
How to use checksums
2b13d2b7dbef128e1278392bf58cf02e798e73fbd4b68d7e047948350dc45ba9
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.0

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.0 This release

2 release files 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