| name | tauri-browser |
| description | Automate and inspect Tauri apps via CLI. Ref-based element targeting, DOM snapshots, screenshots, JS execution, Tauri command invocation, and log streaming. Output designed for LLM consumption. |
tauri-browser
Automate and inspect Tauri apps via the debug bridge plugin. Same UX as agent-browser — ref-based element targeting, output designed for LLM consumption.
Prerequisites
The target Tauri app must include tauri-plugin-debug-bridge behind a feature flag:
[dependencies]
tauri-plugin-debug-bridge = { version = "0.5", optional = true }
[features]
debug-bridge = ["tauri-plugin-debug-bridge"]
#[cfg(feature = "debug-bridge")]
app.plugin(tauri_plugin_debug_bridge::init());
No capability configuration needed on plugin 0.4.1+ — it self-grants debug-bridge:default at runtime. (On 0.4.0 and earlier, eval/invoke silently time out unless the app adds that permission to a capability file; upgrade instead — a capability referencing the feature-gated plugin breaks release builds.)
Run the app with cargo tauri dev --features debug-bridge.
Authentication
The plugin writes a discovery file on startup to /tmp/tauri-debug-bridge/<app-identifier>.json containing the port and auth token. The CLI reads this automatically:
tauri-browser connect
tauri-browser snapshot -i
When multiple Tauri apps are running, specify which one:
tauri-browser --app com.example.myapp connect
You can still pass the token explicitly as an override:
tauri-browser --token "a1b2c3d4e5f6..." connect
The /health endpoint does not require auth.
Commands
Connect and inspect
tauri-browser connect
tauri-browser -p 9230 connect
tauri-browser windows
Targeting webviews (multiwebview windows)
Commands default to the "main" webview. Windows with child webviews
(Window::add_child, e.g. an embedded live web view) list every webview under
webviews: in windows output; target one with -w/--window on run-js,
screenshot, snapshot, click, fill, and invoke:
tauri-browser run-js -w live-main "document.title"
tauri-browser screenshot -w main/live-main child.png
tauri-browser snapshot -i -w live-main
A wrong label returns the addressable targets, e.g.
webview 'nope' not found — available: main, main/live-main.
Child webviews on remote URLs: screenshot works (native capture), but
run-js/snapshot/click/fill time out — Tauri's ACL blocks the result
callback for remote origins. Requires plugin 0.5.0+; on older plugins a child
webview makes the whole window vanish from the bridge.
DOM interaction (ref-based)
tauri-browser snapshot -i
tauri-browser click @e1
tauri-browser fill @e2 "user@example.com"
tauri-browser click "button.submit"
Screenshots
tauri-browser screenshot
tauri-browser screenshot app.png
JavaScript execution
tauri-browser run-js "document.title"
tauri-browser run-js "document.querySelectorAll('li').length"
Tauri backend
tauri-browser invoke get_signals '{"configPath":"config/live.toml"}'
tauri-browser invoke auth_status '{}'
tauri-browser state
tauri-browser commands
Events
tauri-browser events emit "refresh" '{"force":true}'
tauri-browser events listen "state-changed"
Console
tauri-browser console
tauri-browser errors
Messages are tagged with their source webview: {"level":"log","message":"...","webview":"live-main"}.
Typical workflow
tauri-browser connect
tauri-browser snapshot -i
tauri-browser fill @e2 "AAPL"
tauri-browser click @e1
tauri-browser screenshot result.png
tauri-browser console
tauri-browser invoke get_positions '{"symbol":"AAPL"}'
Output formats
tauri-browser -f json snapshot
tauri-browser -f text connect