Skip to content

First Command

A quick tutorial to get started with DOMGuard.

1. Start Chrome

chrome --remote-debugging-port=9222

Navigate to any website (e.g., https://example.com).

2. Check Connection

domguard status

You should see:

✓ Connected to Chrome at 127.0.0.1:9222

3. Inspect the Page

View DOM Tree

domguard debug dom

View Accessibility Tree

domguard debug aria

This is especially useful for AI agents to understand page structure.

View Console Messages

domguard debug console

4. Interact with the Page

Take a Screenshot

domguard interact screenshot

Saves to .domguard/screenshots/.

Click an Element

domguard interact click "a"

Type Text

domguard interact type "input[type=search]" "hello world"
domguard interact navigate "https://github.com"

5. Use JSON Output

For programmatic use, add --json:

domguard --json debug dom
domguard --json interact screenshot

Next Steps