Tondavo

v0.1.9
io.github.rozetyp/tondavo Checked 1 day ago Published 1 day ago

Debug your localhost web app on your real phone: errors, screen, taps and JS for your coding agent.

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

status

Is a phone connected? Lists each connected device (model, browser, visible or in the background, last heard).

logs

Recent events from the phone: JS errors, failed or stalled requests, console output, taps, page changes, layout overflow, things the user pointed at with a 3-finger tap.

ParameterTypeDescription
limitnumberHow many (default 50)
typestringOnly this event type, e.g. js_error, net_error, user_point, tap

screen

What is visible on the phone's screen right now, as text: each element with its position and size, tappable ones in [brackets].

screenshot

A screenshot of the phone. A real frame of the whole screen when screen capture is running (tondavo --capture, after one tap on the phone), otherwise the page drawn by the phone's own browser.

eval

Run JavaScript in the page on the phone and return the result (an expression, or statements with return). Use it to read state or to check a cause.

ParameterTypeDescription
code *stringJavaScript to run in the phone's page; the value of the last expression, or of a returned promise, comes back
timeout_msnumberDefault 5000

tap

Tap on the phone like a finger: whatever is on top at that point gets it (an invisible overlay catches it, as it would a real tap). iOS opens the keyboard and starts audio only for real taps.

ParameterTypeDescription
target *stringA CSS selector (e.g. "#send") or "x,y" in CSS pixels from the top-left of the visible screen

type

Put text into a field on the phone (fires input and change).

ParameterTypeDescription
target *stringA CSS selector (e.g. "#send") or "x,y" in CSS pixels from the top-left of the visible screen
text *stringThe text to put in the field

swipe

Swipe on the phone from one point or element to another.

ParameterTypeDescription
from *stringA CSS selector (e.g. "#send") or "x,y" in CSS pixels from the top-left of the visible screen
to *stringA CSS selector (e.g. "#send") or "x,y" in CSS pixels from the top-left of the visible screen

reload

Reload the page on the phone. (It also reloads by itself when a project file is saved.)

wait_for

Wait for the next event from the phone, e.g. "hello" after a reload, "js_error", "tap". Use it to check a fix instead of sleeping.

ParameterTypeDescription
textstringOnly an event containing this text
timeout_msnumberDefault 15000
typestringEvent type, or "any"