A local web app that renders sim-use ui --json onto a scaled SVG canvas so you can see, side-by-side with your running simulator, which UI elements the accessibility tree actually exposed.
The Viewer is bundled into the sim-use binary. No Node, no npm install:
sim-use viewerThis boots a 127.0.0.1-only HTTP server (auto-port; pass --port N to pin), opens your default browser (suppress with --no-open), and serves the built SPA out of the binary's resources.
For React / SPA development you still want hot-reload + source maps, which means running Vite alongside the API server:
cd Tools/Viewer
npm install # one-off
npm run devThis starts two processes:
sim-use viewer --no-open --port 4000onhttp://127.0.0.1:4000(the real/api/*server)- Vite dev server on
http://127.0.0.1:5173
Open http://127.0.0.1:5173. /api/* calls are proxied to sim-use viewer, so dev mode exercises the production code path. sim-use must be on PATH; to use a local build, run SIM_USE_BIN=/path/to/sim-use npm run dev.
When you're happy with the change, regenerate the bundled SPA assets:
make viewer # or: scripts/build-viewer.shGET /api/devices— list booted simulators and connected Android devices.GET /api/snapshot?deviceId=<DEVICE_ID>—sim-use ui --json→{ screen, entries, outline, capturedAt }.screen.orientationcarries the CLI's calibrated interface orientation (portrait,landscape-right, …) and is omitted when the CLI reports none (Android).udid=is still accepted as a deprecated alias.POST /api/tap— replaysim-use tap @Non the selected element.
- Device — pick a booted simulator or connected device.
- Play / Stop — start / stop interval sampling. First click also fires an immediate shot.
- Interval select — sampling period (1s / 2s / 5s).
- T — replay
sim-use tapon the selected element. - Up / Down — step through outline entries.
- Click any box in the canvas, or any
@Nline in the outline pane, to cross-highlight.
Dashed horizontal lines at y=120 and y=H-120 mark the Top / Content / Bottom y-band boundaries.
