# veb Headless browser automation CLI for agents and humans. Near-complete Playwright parity. ## Installation ```bash pnpm install npx playwright install chromium pnpm build ``` ## Usage ```bash # Navigation veb open https://example.com # Clicking veb click "#submit-btn" veb dblclick "#item" # Form input veb type "#search" "query" # Type character by character veb fill "#email" "test@example.com" # Clear and fill (faster) veb check "#agree" # Check checkbox/radio veb uncheck "#newsletter" # Uncheck checkbox veb select "#country" "US" # Select dropdown # Keyboard veb press Enter veb press Tab # Mouse veb hover "#menu" veb focus "#input" veb drag "#source" "#target" # File upload veb upload "#file-input" ./document.pdf veb upload "#files" ./a.png ./b.png # Waiting veb wait "#loading" # Wait for selector veb wait --text "Welcome" # Wait for text veb wait 2000 # Wait 2 seconds # Screenshots & PDF veb screenshot page.png veb screenshot --full page.png # Full page veb screenshot -s "#hero" # Specific element veb pdf report.pdf # Content extraction veb snapshot # Accessibility tree (best for agents) veb extract "#main" # Get HTML veb eval "document.title" # Run JavaScript # Scrolling veb scroll down 500 veb scroll up veb scroll -s "#container" down # Semantic locators (Playwright's recommended approach) veb role button click --name "Submit" veb role textbox fill "hello" --name "Email" veb text "Sign In" click veb text "Submit" click --exact veb label "Email" fill "test@test.com" veb placeholder "Search..." fill "query" # Frames/iframes veb frame "#iframe" # Switch to iframe veb mainframe # Switch back to main # Cookies veb cookies # Get all cookies veb cookies set '[{"name":"session","value":"abc123","domain":".example.com"}]' veb cookies clear # Storage veb storage local # Get all localStorage veb storage local myKey # Get specific key veb storage local set key value # Set value veb storage local clear # Clear localStorage veb storage session # sessionStorage (same commands) # Dialogs (alerts, confirms, prompts) veb dialog accept # Accept next dialog veb dialog accept "input text" # Accept prompt with text veb dialog dismiss # Dismiss next dialog # Tabs veb tab new veb tab list veb tab 0 # Switch to tab veb tab close # Windows veb window new # Sessions (isolate multiple agents) veb --session agent1 open example.com veb --session agent2 open google.com VEB_SESSION=agent1 veb click "#btn" veb session list # Close browser veb close ``` ## Agent Mode Use `--json` flag for machine-readable output: ```bash veb snapshot --json veb eval "document.title" --json ``` ## Commands Reference ### Navigation & Interaction | Command | Description | |---------|-------------| | `open ` | Navigate to URL | | `click ` | Click element | | `dblclick ` | Double-click | | `type ` | Type text | | `fill ` | Clear & fill | | `press ` | Press key | | `check ` | Check checkbox | | `uncheck ` | Uncheck | | `select ` | Select option | | `hover ` | Hover | | `focus ` | Focus | | `drag ` | Drag & drop | | `upload ` | Upload files | | `scroll [amount]` | Scroll | ### Semantic Locators | Command | Description | |---------|-------------| | `role ` | By ARIA role | | `text ` | By text | | `label