agentleFS
MathiasPaulenkoMathiasPaulenko/ai-toolkit/skills/wavexis-cli-automation/SKILL.md

wavexis-cli-automation

Skill2 starsChanged 4 months agoMITView on GitHub

Browser automation with wavexis CLI: screenshots, PDFs, scraping, REPL, multi-action YAML, stealth mode, serve mode, performance audits, and CI assertions. 130+ commands, CDP + BiDi backends.

  • Installs packages
  • Sends data out

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use --assert with eval to create CI gates:

    line 263
  2. Very specific:

    Run wavexis --help for the full list.

    line 746

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

WaveXis CLI Automation

Description

wavexis is a command-line tool for browser automation. It wraps cdpwave (Chrome DevTools Protocol) and bidiwave (WebDriver BiDi) behind a unified CLI with 130+ top-level commands and 480+ sub-commands. No Node.js, no Chromium download — it uses your existing Chrome or Edge installation directly.

When to Invoke

  • Running browser automation tasks from the command line
  • Taking screenshots, generating PDFs, or scraping page content
  • Creating multi-action YAML configs for chained browser operations
  • Using stealth mode for anti-bot scraping
  • Setting up serve mode (HTTP API + WebSocket streaming)
  • Writing CI assertions with --assert flags
  • Using the interactive REPL for live browser sessions
  • Batch processing multiple URLs
  • Recording and replaying browser sessions
  • Capturing HAR files or performance metrics

1. Installation

CDP backend (default, recommended)

pip install wavexis[cdp]

BiDi backend

pip install wavexis[bidi]

Serve mode + image extras

pip install wavexis[cdp,serve,image]

Docker

docker run -p 8080:8080 ghcr.io/mathiaspaulenko/wavexis:latest

Verify installation

wavexis install_check

2. Backend Selection

wavexis supports two backends with full feature parity:

BackendFlagBrowsersDriver needed
CDP (default)--backend cdpChrome, Edge, Brave, ChromiumNo
BiDi--backend bidiChrome, Firefox, EdgeYes (ChromeDriver / geckodriver)

Switch backend per command:

# CDP (default)
wavexis screenshot https://example.com -o out.png

# BiDi
wavexis screenshot https://example.com -o out.png --backend bidi

3. Core Commands

Screenshot

# Basic screenshot
wavexis screenshot https://example.com -o out.png

# Full-page screenshot
wavexis screenshot https://example.com -o full.png --full-page

# Screenshot of a specific element
wavexis screenshot https://example.com -o el.png --selector "h1"

# Screenshot with device emulation
wavexis screenshot https://example.com -o mobile.png --device iphone-15

PDF

# Generate a PDF
wavexis pdf https://example.com -o out.pdf

# Specific paper size
wavexis pdf https://example.com -o out.pdf --paper a4

Scrape

# Scrape page content
wavexis scrape https://example.com --selector "article"

# Scrape with text output
wavexis scrape https://example.com --selector "div.content" --format text

Evaluate JavaScript

# Evaluate expression
wavexis eval https://example.com -e "document.title"

# With CI assertion
wavexis eval https://example.com -e "document.title" --assert "== Expected Title"

Navigate

wavexis navigate https://example.com

4. REPL (Interactive Mode)

Launch a non-headless browser and execute commands in real time:

wavexis repl

Supported REPL commands:

CommandDescription
navigate <url>Navigate to URL
screenshotTake screenshot
eval <expr>Evaluate JavaScript
click <selector>Click element
type <selector> <text>Type text into element
fill <selector> <text>Fill input field
hover <selector>Hover over element
key <key>Press key
cookiesShow cookies
urlShow current URL
titleShow page title
wait <seconds>Wait
backGo back
forwardGo forward
reloadReload page
helpShow help
exit / quitExit REPL

5. Multi-Action YAML

Chain multiple actions in sequence on a single browser session:

wavexis multi config.yml

YAML config format

actions:
  - navigate: https://example.com
  - screenshot:
      full_page: true
  - eval: document.title
  - click: "#login"
  - type:
      selector: "#username"
      text: admin@example.com
  - screenshot: {}

Multi-action options

# Watch mode — re-run on file change
wavexis multi config.yml --watch

# Dry run — show actions without executing
wavexis multi config.yml --dry-run

# Parallel execution
wavexis multi config.yml --parallel

# Action caching — cache results for 60 seconds
wavexis multi config.yml --cache-ttl 60

Cacheable actions: screenshot, dom, scrape, eval, cookies, headers. Cache is keyed by URL, action type, and params hash.

Init wizard

Generate a wavexis.yaml config interactively:

wavexis init

Or with flags:

wavexis init -t multi-step -u https://example.com -s "#login" --text "admin" -o config.yaml

List available templates:

wavexis init --list

Templates: screenshot, pdf, scrape, eval, multi-step, cookies, har.


6. Stealth Mode

Hide headless browser indicators for scraping protected sites:

# Global flag — applies to all commands
wavexis --stealth screenshot https://example.com -o out.png
wavexis --stealth scrape https://protected-site.com --selector "article"

Stealth mode hides:

  • navigator.webdriver
  • Fakes plugins, languages, chrome runtime
  • Fakes WebGL vendor/renderer
  • Fakes permissions API
  • Fakes navigator.connection, hardwareConcurrency, deviceMemory, platform

Works with both CDP and BiDi backends.


7. CI Assertions

Use --assert with eval to create CI gates:

# Equality check — exit 0 if title matches, 1 otherwise
wavexis eval https://example.com -e "document.title" --assert "== Expected Title"

# Inequality
wavexis eval https://example.com -e "document.title" --assert "!= Old Title"

# Substring
wavexis eval https://example.com -e "document.body.innerText" --assert "contains Welcome"

# Regex
wavexis eval https://example.com -e "document.title" --assert "matches Error \\d+"

Output includes assert:, result:, and status: PASS/FAIL. Exit code 0 on pass, 1 on fail.


8. Performance Metrics

Key metrics

# LCP, FCP, CLS, TTFB with human-readable summary
wavexis perf https://example.com

Advanced metrics

# CPU trace
wavexis perf https://example.com -m trace -d 5000 -o trace.json

# CPU profile
wavexis perf https://example.com -m profile -o profile.json

# JS code coverage
wavexis perf https://example.com -m coverage -o coverage.json

# CSS coverage
wavexis perf https://example.com -m css-coverage -o css-coverage.json

# Heap snapshot
wavexis perf https://example.com -m heap-snapshot -o heap.json

Metrics modes: metrics (default), trace, profile, heap-snapshot, coverage, css-coverage.

Core Web Vitals scoring

# Basic measurement
wavexis cwv https://example.com

# With CI budgets (fails if thresholds exceeded)
wavexis cwv https://example.com --budget '{"lcp_ms":2500,"cls":0.1,"inp_ms":200}'

# Save report to file
wavexis cwv https://example.com -o cwv-report.json

Ratings: good / needs-improvement / poor based on official Google thresholds.

MetricGoodPoor
LCP< 2500ms> 4000ms
CLS< 0.1> 0.25
INP< 200ms> 500ms

9. Network Commands

Headers and user agent

wavexis headers https://example.com
wavexis user-agent https://example.com --ua "Custom UA"

Block and throttle

wavexis block https://example.com -p "*/ads/*"
wavexis throttle https://example.com --download 50000 --upload 25000 --latency 400

HAR capture

wavexis har https://example.com -o out.har

Intercept and mock

# Intercept requests matching pattern
wavexis intercept https://example.com -p "*/api/*" --block

# Mock response
wavexis mock https://example.com -p "*/api/*" -b '{"mock":true}' -s 200

Request modification

# Modify request headers
wavexis modify https://example.com -p "*/api/*" --header "X-Custom: value"

# Modify response body
wavexis modify-response https://example.com -p "*/api/*" -b '{"modified":true}' -s 200

# Keep browser open for interception
wavexis modify https://example.com -p "*/api/*" --wait 10

HAR replay

wavexis har-replay captured.har --url https://staging.example.com

Network inspection

wavexis inspect https://example.com

10. Emulation

Device emulation

wavexis emulation device https://example.com --device iphone-15 -o shot.png

Viewport

wavexis emulation viewport https://example.com --width 375 --height 812 -o shot.png

Geolocation

wavexis emulation geolocation https://example.com --lat 35.6762 --lon 139.6503 -o shot.png

Timezone

wavexis emulation timezone https://example.com --timezone "Asia/Tokyo"

Dark mode

wavexis emulation dark-mode https://example.com --enabled

Other emulation

wavexis emulation media https://example.com --media print
wavexis emulation vision-deficiency https://example.com --type achromatopsia
wavexis emulation idle-override https://example.com --idle
wavexis emulation disable-js https://example.com
wavexis emulation visible-size https://example.com --width 800 --height 600

List available devices

wavexis devices

11. Input Commands

# Click
wavexis click https://example.com --selector "#button"

# Type text
wavexis type https://example.com --selector "#input" --text "Hello"

# Fill field
wavexis fill https://example.com --selector "#input" --text "value"

# Select option
wavexis select https://example.com --selector "select" --value "option1"

# Hover
wavexis hover https://example.com --selector "#menu"

# Press key
wavexis key https://example.com --key "Enter"

# Drag
wavexis drag https://example.com --from "#source" --to "#target"

# Tap (touch)
wavexis tap https://example.com --selector "#button"

12. Cookies

# Get cookies
wavexis cookies https://example.com

# Set cookie
wavexis cookies https://example.com --set --name "session" --value "abc123"

# Delete cookie
wavexis cookies https://example.com --delete --name "session"

# Clear all cookies
wavexis cookies https://example.com --clear

13. Auth

Apply an auth context (cookies, headers, basic auth) from a JSON file:

# Apply auth context and print page title
wavexis auth context.json https://example.com/login

# Apply auth context and save a screenshot
wavexis auth context.json https://example.com/login --screenshot -o authed.png

Auth context JSON format:

{
  "cookies": [
    {"name": "session", "value": "abc123", "domain": "example.com"}
  ],
  "headers": {"Authorization": "Bearer token"},
  "username": "user",
  "password": "pass"
}

14. Record and Replay

# Generate a YAML session from action types (non-interactive)
wavexis record https://example.com -o session.yml --actions "screenshot,eval"

# Record real interactions in a visible browser window
wavexis record https://example.com --interactive --duration 60 -o session.yml

# Replay a recorded session
wavexis replay session.yml

15. Serve Mode

HTTP API server with WebSocket streaming:

# Start serve mode
wavexis serve --host 0.0.0.0 --port 8080

# With rate limiting (60 requests/min)
wavexis serve --host 0.0.0.0 --port 8080 --rate-limit 60

HTTP API

curl -X POST http://localhost:8080/screenshot \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}' \
  -o screenshot.png

WebSocket streaming

Connect to ws://localhost:8080/ws for real-time streaming of:

  • Screenshots
  • Console events
  • Navigation events
  • DOM mutations
  • Performance metrics

16. Batch and Crawl

Batch processing

# Process multiple URLs from file
wavexis batch urls.txt --action screenshot --output-dir ./screenshots/

Crawling

# Crawl a website collecting titles and links
wavexis crawl https://example.com --depth 3 --output crawl-results.json

17. Advanced Commands

Accessibility

# Accessibility tree
wavexis a11y https://example.com

# axe-core audit
wavexis axe https://example.com -o a11y-report.json

Shadow DOM

# Click inside shadow root
wavexis shadow https://example.com click "#host" "#button"

# Fill inside shadow root
wavexis shadow https://example.com fill "#host" "#input" "value"

# Evaluate inside shadow root
wavexis shadow https://example.com eval "#host" "document.title"

Natural language selectors

# Click using natural language
wavexis nl https://example.com click "the login button"

# Fill using natural language
wavexis nl https://example.com fill "the email field" "user@example.com"

# Find using natural language
wavexis nl https://example.com find "the submit button"

WebExtensions

# Install an unpacked extension directory
wavexis extension-install /path/to/extension/

# Install a .crx file
wavexis extension-install /path/to/extension.crx

# List installed extensions
wavexis extension-list

# Uninstall by extension ID
wavexis extension-uninstall <extension-id>

Browser preferences

# Get a preference
wavexis pref-get download.default_directory

# Set a preference
wavexis pref-set download.default_directory /tmp/downloads

Security

# Get security state
wavexis security https://example.com

# Ignore certificate errors
wavexis security https://example.com --ignore-cert

Visual diff

# Compare current page with baseline
wavexis visual-diff https://example.com --baseline baseline.png -o diff.png

Lighthouse

wavexis lighthouse https://example.com -o lighthouse-report.json

Tracing

# Start unified tracing
wavexis trace https://example.com start

# Stop tracing
wavexis trace https://example.com stop -o trace.json

18. Docker

Pull and run

docker run -p 8080:8080 ghcr.io/mathiaspaulenko/wavexis:latest

Build locally

docker build -t wavexis .
docker run -p 8080:8080 wavexis

Docker Compose

version: "3.8"
services:
  wavexis:
    image: ghcr.io/mathiaspaulenko/wavexis:latest
    ports:
      - "8080:8080"
    environment:
      - WAVEXIS_BACKEND=cdp

19. Command Categories Reference

CategoryCommands
Capturescreenshot, pdf, screencast, scrape
Navigatenavigate, back, forward, reload, stop, tabs
Consoleconsole, logs
Cookiescookies (get/set/delete/clear)
Networkheaders, user-agent, block, throttle, cache, intercept, mock, har
Browseropen, close, version
Emulationemulation device, emulation viewport, emulation geolocation, emulation timezone, emulation dark-mode, emulation media, emulation vision-deficiency, emulation idle-override, emulation disable-js, emulation visible-size, devices
Inputclick, type, fill, select, hover, key, drag, tap
CSScss get-styles, css get-computed, css get-rules
Debugdebug break, debug step, debug pause, debug resume
Performanceperf metrics, perf trace, perf profile, perf coverage, perf heap-snapshot, perf css-coverage, cwv
Storagestorage get, storage set, storage clear, storage list, indexeddb
Advancedsw, animation, record, replay, webauthn, cast, bluetooth, extension-install, extension-uninstall, extension-list, lighthouse, a11y, download, dialog, permissions, security
Preferencespref-get, pref-set
Authauth
Serveserve
Interactiverepl, init
Network inspectioninspect, modify, modify-response, har-replay
Tracingtrace
Accessibilityaxe
Eventsevents
Natural languagenl
Shadow DOMshadow
Batchbatch
Crawlcrawl
Utilitymulti, raw, backends, install_check, completions, plugins

Run wavexis --help for the full list.


20. Best Practices

  • Start with the CLI — Use wavexis commands for one-off tasks before writing Python scripts
  • Use multi-action YAML — Chain actions in a single session to avoid browser launch overhead
  • Cache when repeating — Use --cache-ttl for repeated multi-action workflows
  • Stealth for scraping — Always use --stealth when scraping protected sites
  • CI assertions — Use --assert with eval for reliable CI gates (exit 0/1)
  • Batch for multiple URLs — Use batch instead of running commands in a loop
  • Serve mode for shared use — Deploy wavexis serve in Docker for team-wide browser access
  • Choose backend early — CDP for Chrome-only (no driver), BiDi for Firefox support
  • Use init wizard — Run wavexis init to scaffold YAML configs from templates
  • REPL for exploration — Use wavexis repl to interactively test selectors and actions

21. Common Pitfalls

PitfallCauseSolution
Browser not foundNo Chrome/Edge installedInstall Chrome or Edge; run wavexis install_check
BiDi backend failsNo ChromeDriver/geckodriverInstall the driver or use CDP backend (default)
Slow multi-actionBrowser launches per actionUse wavexis multi with YAML config
Scraping blockedAnti-bot detectionUse --stealth flag
CI flaky assertionsTiming issuesAdd wait actions in YAML before assertions
Duplicate screenshotsNo cachingUse --cache-ttl for repeated runs
Serve mode exposedBound to 0.0.0.0 without protectionUse rate limiting and reverse proxy
Large HAR filesCapturing everythingFilter with -p URL patterns
Extension not loadingWrong path formatUse absolute path to unpacked extension dir
Device not foundMisspelled device nameRun wavexis devices to list available devices

22. References

  • references/cli-command-reference.md — Full command catalog with all flags and options
  • references/multi-action-yaml.md — YAML config syntax, action types, and examples
  • references/serve-mode.md — HTTP API endpoints, WebSocket events, and Docker deployment
  • assets/templates/screenshot.yml — Screenshot multi-action template
  • assets/templates/multi-step.yml — Multi-step login + screenshot template
  • assets/templates/scrape.yml — Scraping multi-action template
  • assets/templates/ci-assertion.yml — CI assertion template
  • Related skills: wave-ecosystem-guide, wavexis-mcp-agent-integration, wavexis-web-scraping, wavexis-performance-audit

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.