@unblocklabs/openclaw-iphone-ops
v0.11.1
Published
Python CLI and agent skills for controlling a dedicated USB-connected iPhone from macOS.
Readme
OpenClaw iPhone Operations
A small Python controller for a dedicated USB-connected physical iPhone. The agent plans and judges results; this package owns the phone connection and executes direct WebDriverAgent controls. No runtime dependencies, and no second model unless optional goal navigation is enabled.
Use one persistent session for observation, taps, swipes, desired-value inputs
and app transitions. set fills text, a native wheel date, a picker option or a
Boolean control in one agent-facing request. Optional private input comparison, foreground
readiness and route timing help inspect results. The session's
ready.capabilities reports supported optional operations.
Use this checkout
Requires macOS, Python 3.11+, full Xcode, and a signed, running WDA runner on a
trusted USB-connected iPhone with Developer Mode enabled. UI mutations require
an unlocked screen. Configure the dedicated phone's physical UDID in
~/.openclaw/iphone/config.env (see .env.example).
PYTHONPATH=src python3 -m openclaw_iphone session --device PHYSICAL_UDID --allow-imagesKeep the process and its stdin/stdout pipes open. Send one JSON object per line; read each response before making the next decision. For example:
{"op":"observe"}
{"op":"tap","target":{"role":"XCUIElementTypeButton","label":"Search"}}
{"op":"set","value":"a search query"}
{"op":"press","button":"enter","observe":"image"}
{"op":"swipe","from_x":200,"from_y":700,"to_x":200,"to_y":250}
{"op":"close"}Coordinates default to device points. Image-pixel coordinates explicitly use
"space":"image". See the session protocol for units,
target IDs, input replacement, private input files, masking and failure outcomes.
Use set for a complete field value and type for deliberate insertion.
Date input accepts one ISO date and handles supported native wheels internally;
ambiguous component identity can use an explicit mapping.
Observation is a screen, not a native view-tree dump: readable content and
controls, short IDs, meaningful parent groups, bounds and state. Empty layout
wrappers stay internal. With image disclosure enabled, the default also returns
a screenshot. Large screens page automatically within the output budget;
follow next_offset without recapturing the screen or invalidating earlier IDs.
The session pins one physical phone and holds exclusive control. Timeouts apply to operations, not agent deliberation. There are no grants, task files, quotas, completion verdicts, mandatory readbacks, or reconciliation permissions. Unknown writes are never replayed automatically. The caller may inspect and choose a subsequent action. Optional observation failure does not erase acknowledgment.
Optional goal navigation
Hosts can enable a goal operation that hands multi-step navigation to
OpenAI's Decisions API (gpt-6-luna, default), Liquid AI's LFM-d1 (d1.2,
d1.2-ultra, or local Apple Silicon MLX d1-omni-600M via openclaw-iphone d1 install
and d1 serve, plus single-pass Box visual grounding on d1.2* for AX-free fallback),
or TypeSafe/Jev (jev-1.14.0, experimental images): the agent names a goal, the session taps,
types and scrolls until it looks done, stopping for consent prompts, low
confidence and risky taps the agent hasn't pre-approved. It is off unless
OPENCLAW_IPHONE_GOAL_ENABLED and the selected provider's API key (or a local
loopback MLX d1-omni-600M server, which needs no key) are configured, and it sends
screenshots and screen text to that provider. openclaw-iphone goal setup stores the
key or points to where it is; openclaw-iphone goal check tests it. See
goal navigation.
Diagnosis and setup
PYTHONPATH=src python3 -m openclaw_iphone devices list
PYTHONPATH=src python3 -m openclaw_iphone doctor --check-ui
PYTHONPATH=src python3 -m openclaw_iphone apps list
PYTHONPATH=src python3 -m openclaw_iphone apps find Safari
PYTHONPATH=src python3 -m openclaw_iphone apps launch SafariUse diagnosis after a failure, not as a ritual before every action. Use
wda run, watchdog once, app inspection/control, and launchd tooling for setup
and recovery.
Close the session before separate mutating commands.
- Service setup
- Goal navigation (optional)
- Mechanics and troubleshooting
- Supervised App Store installation
Distribution
This is a CLI/skills bundle, not a native OpenClaw plugin. Install v0.10.1 with
npm install -g @unblocklabs/[email protected].
The package ships the CLI, skills, docs and snippets; register its skills/ directory with
the agent explicitly. The launcher supports OPENCLAW_IPHONE_PYTHON to select
an absolute Python interpreter. Configuration/evidence belong outside the package.
No installation sets up Xcode, WDA, signing or launchd services automatically.
Validation
npm run preflightPreflight checks shared versions, offline/loopback tests, and the real packed npm installation outside the checkout. Physical-device reliability and speed still require a matched on-device comparison; these checks do not establish it. See release procedure before publishing a new version.
