zero-native has a built-in automation system for inspecting running WebView shell apps. It works through file-based IPC in .zig-cache/zero-native-automation/.
Prerequisites
Run an app with automation enabled:
zig build run-webview -Dplatform=macos -Dautomation=true
Commands
zig build
zig-out/bin/zero-native automate list
zig-out/bin/zero-native automate snapshot
zig-out/bin/zero-native automate screenshot [path]
zig-out/bin/zero-native automate reload
Workflow
- Start the app with automation enabled.
- Run
zig-out/bin/zero-native automate snapshotto confirm the window and WebView source. - Use
zig-out/bin/zero-native automate reloadto request a reload. - Use
zig-out/bin/zero-native automate screenshot [path]when a placeholder screenshot artifact is enough.
Notes
- Automation is compile-time gated: apps built without
-Dautomation=trueignore automation files. - The current screenshot artifact is a placeholder PPM.
- WebView DOM interaction is intentionally out of scope for this file-based automation layer.