Skip to content

Command Reference

tauri-agent-tools provides 25 commands for inspecting, interacting with, and monitoring Tauri applications. Inspection commands are read-only. Interaction commands are debug-only (require the dev bridge).

Command Summary

Command Bridge Required Description
screenshot Optional Capture a screenshot of a window or DOM element
dom Yes Query DOM structure or accessibility tree
eval Yes Evaluate a JavaScript expression
wait Optional Wait for a condition to be met
info No Show window geometry and display server info
list-windows No List all visible windows, marking Tauri apps
ipc-monitor Yes Monitor Tauri IPC calls in real-time
console-monitor Yes Monitor console output in real-time
rust-logs Yes Monitor Rust backend logs and sidecar output
storage Yes Inspect localStorage, sessionStorage, and cookies
page-state Yes Query webview page state
diff No Compare two screenshots with difference metrics
mutations Yes Watch DOM mutations on a CSS selector
snapshot Yes Capture screenshot + DOM + page state + storage in one shot
click Yes Click a DOM element
type Yes Type text into an input
scroll Yes Scroll window or element
focus Yes Focus a DOM element
navigate Yes Navigate within the app
select Yes Select dropdown value or toggle checkbox
invoke Yes Invoke a Tauri IPC command
probe Optional Discover running bridges and check health
capture Yes Full debug evidence bundle
check Yes Structured assertions (exit 0/1)
store-inspect Yes Inspect reactive store state

Categories

Visual Capture

  • screenshot — capture full windows or specific DOM elements with real screen pixels
  • diff — compare two screenshots with pixel-level difference metrics
  • snapshot — capture screenshot + DOM tree + page state + storage in a single call

DOM Inspection

  • dom — explore DOM tree structure, accessibility tree, computed styles
  • eval — run arbitrary JS expressions in the webview (supports --file for loading from files)

Monitoring

  • ipc-monitor — watch Tauri IPC calls with timing and filtering
  • console-monitor — capture console.log/warn/error output
  • rust-logs — monitor Rust tracing/log output and sidecar processes
  • mutations — watch DOM mutations with attribute tracking

State Inspection

  • storage — read localStorage, sessionStorage, and cookies
  • page-state — URL, title, viewport, scroll position, Tauri detection
  • store-inspect — inspect reactive store state (Pinia, Vue devtools, custom hooks)

Window Management

  • info — window geometry, position, display server
  • list-windows — enumerate windows with Tauri detection
  • wait — poll for windows, DOM elements, or JS conditions

Interaction (debug-only)

  • click — click, double-click, or right-click a DOM element
  • type — type text into an input field (supports --clear)
  • scroll — scroll by pixels, to top/bottom, or scroll an element into view
  • focus — focus a DOM element
  • navigate — navigate to a route or URL
  • select — select a dropdown value or toggle a checkbox
  • invoke — call a Tauri IPC command with JSON payload

Workflow

  • probe — discover running bridges, check health, list window labels
  • capture — collect screenshot + DOM + page state + storage + console errors + Rust logs into a bundle
  • check — run structured assertions against DOM state (selector exists, text matches, no console errors)

Common Patterns

JSON output

All commands that produce structured output support --json:

tauri-agent-tools info --title "My App" --json
tauri-agent-tools dom --json
tauri-agent-tools storage --json

Bridge auto-discovery

Commands that need the bridge automatically discover it via token files in /tmp/. You can override with explicit flags:

tauri-agent-tools dom --port 9876 --token abc123

Duration-based monitoring

Monitor commands accept --duration to auto-stop:

tauri-agent-tools ipc-monitor --duration 5000
tauri-agent-tools console-monitor --duration 10000 --level error
tauri-agent-tools rust-logs --duration 10000 --level warn