| name | tauri-agent-tools |
| description | CLI for inspecting and interacting with Tauri desktop apps — DOM queries, screenshots, interaction (click/type/scroll), IPC monitoring, store inspection, structured assertions, plus bridge-free diagnostics (unified cross-layer logs, deep OS process trees, OS logs, app paths, sidecar NDJSON tap/replay, forensic bundles) and the `diagnose`/`bundle` super-commands for one-shot triage. Works against older/vendored bridges by degrading gracefully. |
| version | 0.9.0 |
| tags | ["tauri","desktop","debugging","screenshot","dom","inspection","diff","mutations","snapshot","interaction","click","type","scroll","invoke","probe","capture","check","store-inspect","logs","bundle","process-tree","forensics","os-logs","app-paths","sidecar","config-inspect","diagnose"] |
tauri-agent-tools
CLI tool for agent-driven inspection and interaction with Tauri desktop applications. Inspection commands are read-only. Interaction commands (click, type, scroll, etc.) are debug-only — they only work when the app runs with the dev bridge enabled.
Prerequisites
which tauri-agent-tools
npm install -g tauri-agent-tools
System dependencies by platform:
| Platform | Requirements |
|---|
| Linux X11 | xdotool, imagemagick (sudo apt install xdotool imagemagick) |
| Linux Wayland/Sway | swaymsg, grim, imagemagick |
| Linux Wayland/Hyprland | hyprctl (included with Hyprland), grim, imagemagick |
| macOS | imagemagick (brew install imagemagick), Screen Recording permission |
Bridge vs Standalone
Some commands require the Rust dev bridge running inside the Tauri app. Others work standalone.
Bridge required (needs running Tauri app with bridge):
screenshot --selector, dom, eval, wait --selector, wait --eval, ipc-monitor, console-monitor, rust-logs, storage, page-state, mutations, snapshot, click, type, scroll, focus, navigate, select, invoke, capture, check, store-inspect
Bridge-enriched, but degrade gracefully (use a v0.7+ bridge for full output; otherwise emit a clear note instead of failing — pass --strict to fail loudly):
capabilities audit, webview attach, health (richer with bridge v0.7+)
Standalone (no bridge needed):
screenshot --title (full window only), wait --title, list-windows, info, diff, logs, app-paths, config inspect, os-logs, sidecar tap, sidecar replay, forensics
Optional bridge (work standalone, richer with a bridge):
probe, process-tree (use --deep for a bridge-free OS walk), logs (merges on-disk files alone, or also drains the bridge ring buffer), bundle, diagnose
The bridge auto-discovers via token files in /tmp/tauri-dev-bridge-*.token. No manual port/token configuration needed.
Don't know where to start? diagnose
When something's wrong and you're not sure why, run:
tauri-agent-tools diagnose --config ./src-tauri -o ./diagnose-out
diagnose is a best-effort super-command. It always runs the bridge-free forensics half; if a dev bridge is reachable it also layers /process, /capabilities, /devtools, /health data. The master summary.md lists "Next steps" pointing at the right deeper command. See the tauri-debug-quickstart skill for a full symptom-to-command decision tree.
Debugging decision tree (precision form)
When you know what you're looking at, jump straight to:
| Symptom | First command |
|---|
| Don't know — give me everything | tauri-agent-tools diagnose -o ./diag |
| App is running and bridge is responding | Use the bridge-mediated commands listed above (screenshot, dom, eval, …) |
| Bridge isn't responding (release build, app crashed, pre-webview boot failure) | tauri-agent-tools forensics -o ./forensics-out |
| You only have the bundle id, no source tree | tauri-agent-tools app-paths --identifier com.example.app --platform all --exists |
Need a structured snapshot of tauri.conf.json + capabilities | tauri-agent-tools config inspect --json |
| Suspicion: a sidecar process is emitting malformed/unexpected NDJSON | Run the sidecar under tauri-agent-tools sidecar tap --schema <path> -- <cmd> instead of under Tauri |
| OS-level error visible in Console.app/journalctl but not in app logs | tauri-agent-tools os-logs --identifier com.example.app --level error --duration 30000 |
Core Workflows
Inspect DOM then screenshot an element
tauri-agent-tools list-windows --tauri
tauri-agent-tools dom --depth 3
tauri-agent-tools dom ".sidebar" --depth 2 --styles
tauri-agent-tools screenshot --selector ".sidebar .nav-item.active" -o /tmp/nav.png
Monitor IPC calls
tauri-agent-tools ipc-monitor --duration 10000 --json
tauri-agent-tools ipc-monitor --filter "get_*" --duration 5000 --json
Diagnose app state
tauri-agent-tools page-state --json
tauri-agent-tools storage --type local --json
tauri-agent-tools console-monitor --level error --duration 5000 --json
Capture a full debug snapshot
tauri-agent-tools snapshot -o /tmp/debug --json
Compare screenshots
tauri-agent-tools diff /tmp/before.png /tmp/after.png --json
tauri-agent-tools diff /tmp/expected.png /tmp/actual.png --threshold 1
Monitor Rust logs and sidecar output
tauri-agent-tools rust-logs --duration 10000 --json
tauri-agent-tools rust-logs --level warn --duration 5000 --json
tauri-agent-tools rust-logs --target "myapp::db" --duration 5000 --json
tauri-agent-tools rust-logs --source sidecar --duration 10000 --json
tauri-agent-tools rust-logs --source sidecar:ffmpeg --duration 5000 --json
Merge scattered logs into one timeline (logs)
A real app spreads logs across the bridge ring buffer, the webview console, an on-disk tauri-plugin-log file, and sidecar output. logs discovers what's available, normalizes every source, and emits one timestamp-ordered stream (NDJSON by default; --pretty for humans). Works with no bridge.
tauri-agent-tools logs --config ./src-tauri --pretty
tauri-agent-tools logs --identifier com.example.app --no-bridge
tauri-agent-tools logs --log-dir ~/Library/Logs/com.example.app --level warn --correlate
tauri-agent-tools logs --log-file /path/a.log --log-file /path/b.log --filter "block_id=42"
tauri-agent-tools logs --follow --level warn
tauri-agent-tools logs --follow --interval 1000 --pretty
Each entry is {ts, level, source, subsystem, message, origin} (+ correlation with --correlate). source is rust / sidecar:<name> (bridge) or file:<basename> (disk). Timezone-less timestamps are read as UTC so ordering is host-independent.
Bridge-extended diagnostics (process tree, capabilities, devtools, health)
These commands prefer richer endpoints on a v0.7+ bridge but degrade gracefully against older/vendored bridges: each calls GET /version first to feature-detect, and when an endpoint is missing it emits a clear note: (and falls back where it can) instead of failing. Pass --strict to make a missing endpoint a hard error instead.
tauri-agent-tools process-tree --json
tauri-agent-tools process-tree --deep --json
tauri-agent-tools process-tree --deep --pid 12345
tauri-agent-tools capabilities audit --json
tauri-agent-tools webview attach
tauri-agent-tools webview attach --print-url
tauri-agent-tools webview attach --open
tauri-agent-tools health --json
Sidecars only appear in the bridge's /process view (process-tree without --deep, and health) if integrators register them — by passing Some(®istry) to dev_bridge::spawn_sidecar_monitored or calling dev_bridge::register_sidecar. process-tree --deep needs none of that — it reads the live OS process table, so it surfaces unregistered children and grandchildren regardless.
Bridge-free diagnostics (post-mortem & sidecar workflows)
These six commands need no live bridge — useful for release builds, dead apps, and sidecar processes.
tauri-agent-tools app-paths --config ./src-tauri --json
tauri-agent-tools app-paths --config ./src-tauri --platform all --exists
tauri-agent-tools config inspect --config ./src-tauri --json
tauri-agent-tools os-logs --identifier com.example.app --duration 5000
tauri-agent-tools os-logs --level error --source main --duration 30000
tauri-agent-tools sidecar tap --schema ./schema.json --record /tmp/run.ndjson -- node my-sidecar.js
tauri-agent-tools sidecar replay /tmp/run.ndjson --to-exec node my-sidecar.js --rate 100
tauri-agent-tools forensics --config ./src-tauri -o ./forensics-out
tauri-agent-tools bundle --config ./src-tauri -o ./triage
tauri-agent-tools bundle --config ./src-tauri --with-capture -o ./triage
Watch DOM mutations
tauri-agent-tools mutations "#todo-list" --duration 10000 --json
tauri-agent-tools mutations ".sidebar" --attributes --duration 5000
Find elements by text
tauri-agent-tools dom --text "Settings" --first --json
Interact with the app
tauri-agent-tools click ".submit-btn" --json
tauri-agent-tools type "#search" "hello world" --json
tauri-agent-tools type "#email" "new@email.com" --clear --json
tauri-agent-tools scroll --to-bottom --json
tauri-agent-tools scroll --selector "#item-42" --into-view
tauri-agent-tools focus "#username" --json
tauri-agent-tools navigate "/settings" --json
tauri-agent-tools select "#country" "US" --json
tauri-agent-tools select "input[type=checkbox]" --toggle --json
tauri-agent-tools invoke get_release_context --json
tauri-agent-tools invoke save_item '{"id": 42}' --json
Probe, capture, and check (workflow commands)
tauri-agent-tools probe --json
tauri-agent-tools capture -o /tmp/debug --json
tauri-agent-tools check --selector ".app-ready" --no-errors --json
tauri-agent-tools check --eval "document.querySelectorAll('.block').length > 0" --json
tauri-agent-tools check --text "Workflow loaded" --json
Inspect reactive stores
tauri-agent-tools store-inspect --json
tauri-agent-tools store-inspect --store executionStore --json
Target specific apps and windows
tauri-agent-tools page-state --pid 12345 --json
tauri-agent-tools eval "document.title" --window-label overlay --json
Command Reference
| Command | Key Flags | Bridge? | Description |
|---|
screenshot | --selector <css>, --title <regex>, -o <path>, --max-width <n> | selector: yes, title: no | Capture window or DOM element screenshot |
dom | [selector], --depth <n>, --styles, --text <pattern>, --mode accessibility, --json | yes | Query DOM structure or find elements by text |
eval | <js-expression>, --file <path> | yes | Evaluate JavaScript in webview |
wait | --selector <css>, --eval <js>, --title <regex>, --timeout <ms> | selector/eval: yes | Wait for a condition |
list-windows | --tauri, --json | no | List visible windows |
info | --title <regex>, --json | no | Window geometry and display info |
ipc-monitor | --filter <cmd>, --duration <ms>, --slow <ms>, --stats, --json | yes | Monitor Tauri IPC calls; flag slow calls + per-command latency summary |
console-monitor | --level <lvl>, --filter <regex>, --duration <ms>, --json | yes | Monitor console output |
rust-logs | --level <lvl>, --target <regex>, --source <src>, --duration <ms>, --json | yes | Monitor Rust logs and sidecar output |
storage | --type <local|session|cookies|all>, --key <name>, --json | yes | Inspect browser storage |
page-state | --json | yes | URL, title, viewport, scroll, document size |
diff | <image1> <image2>, -o <path>, --threshold <pct>, --json | no | Compare two screenshots |
mutations | <selector>, --attributes, --duration <ms>, --json | yes | Watch DOM mutations |
snapshot | -o <prefix>, -s <css>, --dom-depth <n>, --eval <js>, --json | yes | Screenshot + DOM + page state + storage |
click | <selector>, --double, --right, --wait <ms>, --json | yes | Click a DOM element |
type | <selector> <text>, --clear, --json | yes | Type text into an input |
scroll | --selector <css>, --by <px>, --to-top, --to-bottom, --into-view, --json | yes | Scroll window or element |
focus | <selector>, --json | yes | Focus a DOM element |
navigate | <target>, --json | yes | Navigate within the app |
select | <selector> [value], --toggle, --json | yes | Select dropdown or toggle checkbox |
invoke | <command> [args-json], --json | yes | Invoke a Tauri IPC command |
probe | --pid <n>, --json | optional | Discover targets and bridge health |
capture | -o <dir>, -s <css>, --logs-duration <ms>, --json | yes | Full debug evidence bundle |
check | --selector, --text, --eval, --no-errors, --json | yes | Structured assertions (exit 0/1) |
store-inspect | --framework, --store <name>, --depth <n>, --json | yes | Inspect reactive store state |
app-paths | --config <path>, --identifier <id>, --platform <os>, --exists, --json | no | Resolve Tauri 2 app's OS data/log/cache/config dirs |
config inspect | --config <path>, --capabilities-dir <path>, --cargo-toml <path>, --json | no | Structured tauri.conf.json snapshot + capability audit |
os-logs | --identifier <id>, --level <lvl>, --source <src>, --since <dur>, --duration <ms>, --json | no | Tail host OS log stream filtered to a Tauri bundle id |
sidecar tap | -- <cmd...>, --schema <path>, --record <path>, --raw, --json | no | Wrap-and-run a sidecar, frame NDJSON, validate envelopes |
sidecar replay | <file>, --to-exec <cmd>, --rate <lps>, --loop, --tap-format, --dir in|out | no | Replay a recorded NDJSON sidecar stream; --tap-format unwraps {dir,ts,line} tap wrapper rows |
forensics | --config <path>, --identifier <id>, -o <dir>, --since <dur>, --json | no | One-shot forensic bundle (works on dead apps) |
logs | --config <path>, --identifier <id>, --log-dir <path>, --log-file <path>, --level <lvl>, --source <re>, --filter <re>, --correlate, --follow, --interval <ms>, --no-bridge, --pretty | optional | Merge on-disk log files + bridge ring buffer into one timestamp-ordered stream; --follow tails the bridge via v0.8 cursor reads (drain-polling fallback on older bridges) |
process-tree | --deep, --pid <n>, --json | optional | Tauri PID + sidecars (bridge /process); --deep walks the full OS descendant tree without the bridge |
capabilities audit | --json | yes (v0.7+) | Live Devtron-style audit of declared Tauri capabilities |
webview attach | --print-url, --open, --json | yes (v0.7+) | Print webview inspector URL or platform hint |
health | --json | yes (v0.7+) | Uptime + webview/sidecar liveness (exit non-zero if unhealthy) |
diagnose | --config <path>, -o <dir>, --since <dur>, --no-bridge, --json | optional | Best-effort super-bundle (forensics + live bridge enrichment) |
bundle | --config <path>, -o <dir>, --with-capture, --no-archive, --json | optional | Shareable incident bundle: logs + deep process tree + app-paths + forensics → redacted dir + .tar.gz |
Targeting Flags
All bridge-dependent commands support these flags:
--port <n> / --token <s> — explicit bridge config (skips auto-discovery)
--pid <n> — target a specific app by PID
--window-label <label> — target a specific webview window (default: main)
--strict — for v0.7-endpoint commands, fail with an upgrade error instead of degrading when the bridge is too old
Important Notes
- Inspection commands are read-only. They don't modify app state.
- Interaction commands are debug-only. They only work with the dev bridge (debug builds).
- Use
--json for structured, parseable output in automation.
- Always use
--duration with ipc-monitor, console-monitor, rust-logs, and mutations.
screenshot --selector requires both the bridge AND platform screenshot tools (imagemagick).
- Multi-app targeting: Use
--pid to target a specific app. Use probe to discover all running bridges.