rustwright-cli is a native, agent-focused interface to the Rustwright CDP engine. CLI commands
share a persistent local Chromium session.
The quickest path is the install script, which grabs a prebuilt binary (and falls back to building from source when a prebuilt binary is not published for your platform):
curl -fsSL https://raw.githubusercontent.com/Skyvern-AI/rustwright/main/install.sh | shTo build from source explicitly (requires Rust 1.88 or newer):
cargo install --path cliInstall Chromium with python -m rustwright install chromium, use a system Chrome/Chromium, or set
RUSTWRIGHT_CHROMIUM, CHROME, or CHROMIUM to an executable path.
rustwright-cli open https://example.com
rustwright-cli snapshot
rustwright-cli click @e1
rustwright-cli fill @e2 "hello"
rustwright-cli text body
rustwright-cli title
rustwright-cli url
rustwright-cli eval "document.querySelectorAll('a').length"
rustwright-cli screenshot page.png --full-page
rustwright-cli closeThe first browser command starts a localhost daemon. Its authenticated connection metadata is stored in a temporary directory; on Unix, the directory and state files use user-only permissions. A stale state file is discarded automatically. Useful global options:
--session <name>isolates concurrent sessions.RUSTWRIGHT_SESSIONsets the default.--jsonreturns one JSON response per command.open --headedshows the browser.open --executable-path <path>selects a Chromium executable for a new session.
Snapshots list visible page content and attach @eN references to interactive elements. References
belong to the latest snapshot and should be refreshed after navigation or major page changes. Direct
CSS selectors and text= selectors remain available when a snapshot reference is not convenient.
References are stored as temporary DOM attributes so later CLI commands can resolve them; pages that
observe DOM attribute changes can detect those markers.
Looking for an MCP server? Rustwright ships a dedicated, standalone MCP server as the
rustwright-mcp package (see mcp-rs/). This CLI focuses on the interactive agent
command surface; the two share the same Rustwright CDP engine.