--- name: unicli-operate description: > Compatibility guide for `unicli operate`. Prefer `unicli browser`, which now exposes the same operator surface plus broker/session diagnostics. version: 1.0.0 triggers: - "operate browser" - "click element" - "fill form" - "extract page data" - "unicli operate" allowed-tools: [Bash] protocol: 2.0 --- ## When to Use Prefer `unicli browser` for new work: ```bash unicli browser open unicli browser state unicli browser click unicli browser type unicli browser find --css unicli browser extract unicli browser tabs unicli browser frames ``` `unicli operate ...` still works, but it is now the compatibility path over the same implementation. ## Core Workflow 1. `open` -> navigate to URL 2. `state` -> inspect DOM, get `[ref]` numbers for interactive elements 3. interact -> `click`, `type`, `select`, `keys` using ref numbers 4. verify -> `state` again or `get value ` to confirm 5. extract -> `eval` for structured data **Always `state` before interacting. Never guess ref numbers.** ## All Operate Subcommands ```bash # Navigation unicli operate open # Navigate to URL unicli operate back # Go back in history unicli operate scroll [direction] # down, up, bottom, top unicli operate close # Close automation window # Inspection unicli operate state # DOM tree with [ref] indices unicli operate screenshot [path] # Save visual capture # Get data unicli operate get title|url # Page title or URL unicli operate get text # Element text by ref unicli operate get value # Input value (verify after type) unicli operate get html [selector] # Page or scoped HTML unicli operate get attributes # Element attributes # Interaction unicli operate click # Click element unicli operate type # Type into element unicli operate select