looktap

v0.7.1
io.github.lakpriya1s/looktap Checked 1 day ago Published 1 month ago

Let your AI agent see, use and control the apps on your phone: screen as text, tap by label.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

ls

List what is on screen: @ref, type, x,y, width×height, label, = value.

ParameterTypeDescription
allbooleanInclude unlabelled elements
devicestringSimulator UDID or adb serial, when several are booted. Remembered for later calls
platformstringWhen both an iOS and an Android device are booted. Remembered for later calls

tap

Tap an element by label or @ref. Returns the settled screen.

ParameterTypeDescription
target *stringA label (exact, else unique prefix/substring) or an @ref from the last listing
devicestringSimulator UDID or adb serial, when several are booted. Remembered for later calls
exactboolean
lsbooleanReturn the settled screen afterwards (default true)
platformstringWhen both an iOS and an Android device are booted. Remembered for later calls

tap_xy

Tap a point (iOS points / Android dp, the units ls prints).

ParameterTypeDescription
x *number
y *number
devicestringSimulator UDID or adb serial, when several are booted. Remembered for later calls
lsbooleanReturn the settled screen afterwards (default true)
platformstringWhen both an iOS and an Android device are booted. Remembered for later calls

long_press

Hold a touch on an element (or a point) for ms (default 800).

ParameterTypeDescription
devicestringSimulator UDID or adb serial, when several are booted. Remembered for later calls
lsbooleanReturn the settled screen afterwards (default true)
msnumber
platformstringWhen both an iOS and an Android device are booted. Remembered for later calls
targetstringA label (exact, else unique prefix/substring) or an @ref from the last listing
xnumber
ynumber

fill

Focus a text field (by label or @ref), clear it, type text, and check the field holds it (a password field: its length). Retypes slowly if not, and fails if it still does not.

ParameterTypeDescription
target *stringA label (exact, else unique prefix/substring) or an @ref from the last listing
text *string
devicestringSimulator UDID or adb serial, when several are booted. Remembered for later calls
lsbooleanReturn the settled screen afterwards (default true)
platformstringWhen both an iOS and an Android device are booted. Remembered for later calls

paste

Put text on the device's clipboard, check it is there, and paste it into the focused field.

ParameterTypeDescription
text *string
devicestringSimulator UDID or adb serial, when several are booted. Remembered for later calls
lsbooleanReturn the settled screen afterwards (default true)
platformstringWhen both an iOS and an Android device are booted. Remembered for later calls

code

Enter a one-time code into its row of digit boxes: tap the first, type each digit, check every box (pastes the code if typing did not fill them).

ParameterTypeDescription
code *string
devicestringSimulator UDID or adb serial, when several are booted. Remembered for later calls
lsbooleanReturn the settled screen afterwards (default true)
platformstringWhen both an iOS and an Android device are booted. Remembered for later calls

type

Type into the focused field.

ParameterTypeDescription
text *string
devicestringSimulator UDID or adb serial, when several are booted. Remembered for later calls
lsbooleanReturn the settled screen afterwards (default true)
platformstringWhen both an iOS and an Android device are booted. Remembered for later calls

key

Press keys: return, escape, delete, tab, space, selectall, paste, home (Android also back).

ParameterTypeDescription
keys *array
devicestringSimulator UDID or adb serial, when several are booted. Remembered for later calls
lsbooleanReturn the settled screen afterwards (default true)
platformstringWhen both an iOS and an Android device are booted. Remembered for later calls

hide_keyboard

Dismiss the on-screen keyboard and take focus from the field (blur validation runs). Fails if it is still up.

ParameterTypeDescription
devicestringSimulator UDID or adb serial, when several are booted. Remembered for later calls
lsbooleanReturn the settled screen afterwards (default true)
platformstringWhen both an iOS and an Android device are booted. Remembered for later calls

swipe

Drag from one point to another (scroll: finger moves up to go down).

ParameterTypeDescription
x1 *number
x2 *number
y1 *number
y2 *number
devicestringSimulator UDID or adb serial, when several are booted. Remembered for later calls
lsbooleanReturn the settled screen afterwards (default true)
msnumber
platformstringWhen both an iOS and an Android device are booted. Remembered for later calls

scroll_to

Swipe until the element is fully on screen (swipes above the keyboard when it is up).

ParameterTypeDescription
target *string
devicestringSimulator UDID or adb serial, when several are booted. Remembered for later calls
platformstringWhen both an iOS and an Android device are booted. Remembered for later calls
upbooleanScroll back up

back

Android system Back; iOS navigation-bar back button.

ParameterTypeDescription
devicestringSimulator UDID or adb serial, when several are booted. Remembered for later calls
lsbooleanReturn the settled screen afterwards (default true)
platformstringWhen both an iOS and an Android device are booted. Remembered for later calls

home

The Home button: go to the home screen, leaving the app running.

ParameterTypeDescription
devicestringSimulator UDID or adb serial, when several are booted. Remembered for later calls
lsbooleanReturn the settled screen afterwards (default true)
platformstringWhen both an iOS and an Android device are booted. Remembered for later calls

wait

Wait until a label (or @ref) is on screen — or, with gone, until it is not. With settle and no target: until the screen, its picture included, holds still for a second, for web pages with no labels to wait for (a sign-in page loading).

ParameterTypeDescription
devicestringSimulator UDID or adb serial, when several are booted. Remembered for later calls
goneboolean
platformstringWhen both an iOS and an Android device are booted. Remembered for later calls
secondsnumberTimeout (default 10)
settleboolean
targetstring

screenshot

A PNG of the screen, returned as an image (scale 0.5 by default: fewer tokens).

ParameterTypeDescription
devicestringSimulator UDID or adb serial, when several are booted. Remembered for later calls
platformstringWhen both an iOS and an Android device are booted. Remembered for later calls
scalenumber0–1

logs

The app's log since the last logs call (first call: the last minute).

ParameterTypeDescription
appstring
devicestringSimulator UDID or adb serial, when several are booted. Remembered for later calls
errorsboolean
grepstring
platformstringWhen both an iOS and an Android device are booted. Remembered for later calls
sincestringe.g. 5m

notifications

The notifications the device holds (Notification Center / the shade), newest first: app, title, body. With until: wait until one has that text (one already there counts), e.g. to check a push arrived. A real iPhone pulls Notification Center down for a moment to read it.

ParameterTypeDescription
allbooleanAndroid: ongoing ones too (charging, foreground services)
appstringOnly this app (id; a real iPhone also matches the shown name)
devicestringSimulator UDID or adb serial, when several are booted. Remembered for later calls
jsonbooleanEvery field (iOS simulator: the push payload too)
platformstringWhen both an iOS and an Android device are booted. Remembered for later calls
secondsnumberHow long until waits (default 30)
untilstringWait for a notification whose title or body has this text

crashes

Crash reports, ANRs and low-memory kills since the last crashes call.

ParameterTypeDescription
appstring
devicestringSimulator UDID or adb serial, when several are booted. Remembered for later calls
platformstringWhen both an iOS and an Android device are booted. Remembered for later calls
sincestring

perf

The app's CPU (100% = one core), memory and threads; or, with frames, frames drawn since the last frames call: janky share, p50–p99 frame time, fps (iOS counts what the screen shows; its first frames call only starts counting, so call it before the action too). Simulator numbers are the Mac's: compare runs, not phones. A real iPhone reads through Instruments, 10–25 s a reading.

ParameterTypeDescription
appstringApp id (default: the configured app, else the app in front)
devicestringSimulator UDID or adb serial, when several are booted. Remembered for later calls
fornumberSeconds to sample, a reading each second, then avg/max
framesbooleanFrame and jank stats instead of CPU and memory
jsonbooleanStructured output
platformstringWhen both an iOS and an Android device are booted. Remembered for later calls

looktap

Any other looktap command line, or several separated by ";" — e.g. "launch com.example.app --ls", "stop com.example.app", "open myapp://home", "expect Welcome", "zoom in", "appearance dark", "rotate landscape", "fold open", "record start demo" … "record stop", "permission grant location com.example.app", "perf com.example.app --for 10s", "launch com.example.app --time", "apps com.example" (is it installed?), "app com.example.app --paths" (its data folder), "devices --all", "boot Pixel_9a" (also waits for one still starting), "shutdown Pixel_9a", "dismiss logbox" (React Native's toast), "sh…

ParameterTypeDescription
command *string
devicestringSimulator UDID or adb serial, when several are booted. Remembered for later calls
platformstringWhen both an iOS and an Android device are booted. Remembered for later calls