You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor to agent-first perceive-reason-act architecture
Replace describe/launch/wait-for commands with unified perceive command
that returns screenshot paths + OCR elements + grid metadata. Remove
tap --text in favor of coordinate-based tapping from perceive output.
Agents now do all reasoning — CLI is a thin perceive-and-act bridge.
- Add perceive command with --base64 flag for OpenClaw compatibility
- Remove describe, launch, wait-for commands and tap --text option
- Switch tap to CGEvent mouse input (iPhone Mirroring accepts it)
- Add grid overlay generation to perceive output
- Update WindowManager with ensureFocus and improved window detection
- Update all docs, SKILL.md, and CHANGELOG
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: AGENTS.md
+26-8Lines changed: 26 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# iphonebase
2
2
3
-
Swift CLI to control iPhone via macOS iPhone Mirroring. Built for AI agents (OpenClaw, Claude Code, MCP) and standalone terminal use.
3
+
Swift CLI to control iPhone via macOS iPhone Mirroring. Built for AI agents (OpenClaw, Claude Code) — the CLI is a thin perceive-and-act bridge, all reasoning lives in the agent.
iphonebase perceive --json # read iOS version from screen
78
95
```
79
96
80
-
### Navigate Settings
97
+
### Scroll through a feed
81
98
82
99
```bash
83
-
iphonebase launch "Settings"
84
-
iphonebase wait-for "Settings" --timeout 5
85
-
iphonebase tap --text "General"
86
-
iphonebase wait-for "About" --timeout 5
87
-
iphonebase tap --text "About"
88
-
iphonebase wait-for "iOS Version" --timeout 5
89
-
iphonebase describe --json # read the full screen
100
+
iphonebase perceive --json # see current screen
101
+
iphonebase scroll down --clicks 5 # scroll content
102
+
sleep 0.5
103
+
iphonebase perceive --json # see new content
90
104
```
91
105
92
-
### Scroll through a feed
106
+
### Tap an app icon (grid cell)
93
107
94
108
```bash
95
-
iphonebase launch "Instagram"
96
-
iphonebase wait-for "Instagram" --timeout 5
97
-
iphonebase scroll down --clicks 5
98
-
iphonebase screenshot --output feed.png
109
+
iphonebase perceive --json # get screen state
110
+
# Agent reads grid image, sees Gmail icon in cell B12
111
+
iphonebase tap --cell B12 # tap the icon by grid cell
112
+
sleep 1
113
+
iphonebase perceive --json # verify app opened
99
114
```
100
115
116
+
Use grid cells for icons, toggles, and non-text elements. Use OCR coordinates for text labels and menu items. See [Grid Mode](#grid-mode-for-vision-model-agents) below.
117
+
101
118
## Grid Mode for Vision-Model Agents
102
119
103
120
OCR misses icons, images, and non-text UI elements. Grid mode lets vision-capable LLMs (Claude, GPT-4o) see the full screen with coordinate references:
@@ -134,43 +151,32 @@ No jailbreak. No developer account. No app installation on the phone. Your iPhon
134
151
135
152
| Command | Description |
136
153
|---|---|
137
-
|`doctor`| Run diagnostics on all prerequisites |
138
-
|`status`| Check if iPhone Mirroring is available |
139
-
|`screenshot`| Capture the iPhone screen as PNG (supports `--grid`) |
140
-
|`describe`| OCR — detect all text on screen with coordinates |
141
-
|`wait-for`| Poll until specific text appears (or timeout) |
0 commit comments