Handstage exposes a layered option system.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/l-xiaoshen/handstage/llms.txt
Use this file to discover all available pages before exploring further.
HandstagesSharedOptions applies to every connection mode. HandstagesLocalOptions and HandstagesConnectOptions extend it with mode-specific fields. LocalBrowserLaunchOptions contains the full set of flags forwarded to the Chrome launcher.
HandstagesSharedOptions
Applies to all three connection modes: connectLocal, connectTransport, and connectSession.
Optional external session identifier used to correlate logs and traces with your own tracking system. When omitted, Handstage generates an internal UUID.
When
true, the browser process is not killed when close() is called and SIGINT handling is relaxed so the parent process can exit while Chrome keeps running. Useful for long-lived or reusable browser instances.Minimum log level to emit.
LogLevel.Error is quietest (errors only), LogLevel.Info adds informational messages, and LogLevel.Debug emits everything. See Error types and error handling for enum values.Custom log sink. When omitted, Handstage uses a default console logger. The function receives every
LogLine that passes the verbose threshold.HandstagesLocalOptions
Passed to V3.connectLocal(). Extends HandstagesSharedOptions.
Full set of Chrome launch and connection flags. See
LocalBrowserLaunchOptions below.HandstagesConnectOptions
Passed to V3.connectTransport() and V3.connectSession(). Extends HandstagesSharedOptions.
Viewport dimensions to apply after connecting. Overrides any default viewport set by the browser.
Device pixel ratio for the viewport. Affects screenshot resolution and layout scaling.
Directory where downloaded files are saved. Requires
acceptDownloads to also be set when using this field.When
true, downloads are accepted and written to downloadsPath (or Chrome’s default download directory). When false, downloads are denied.LocalBrowserLaunchOptions
Configures how Handstage launches or attaches to a local Chrome process. All fields are optional.
Browser binary and process
Absolute path to the Chrome or Chromium executable. When omitted, Handstage uses the system Chrome found by
chrome-launcher.Remote debugging port for Chrome’s CDP WebSocket. Defaults to a random available port when omitted.
Run Chrome in headless mode. When omitted, Chrome uses its own default (headless in CI environments).
Automatically open DevTools for every new tab (
--auto-open-devtools-for-tabs). Only applies in headed mode.Enable or disable the Chromium sandbox. Defaults to the Chrome launcher’s default.
Additional command-line flags to pass to the Chrome process, appended after Handstage’s default flags.
When
true, suppress all of Handstage’s default Chrome flags. When an array of strings, suppress only the flags whose text contains any of the provided strings.User profile
Path to the Chrome user data directory. When omitted, a temporary directory is created in
$TMPDIR/handstages-v3/ and deleted on close.When
true, the user data directory is not deleted when the session closes, even if it was created as a temporary directory.Viewport and display
Initial browser window size. Handstage passes
--window-size to Chrome and sets Emulation.setDeviceMetricsOverride for each page. Defaults to { width: 1288, height: 711 }.Device pixel ratio (
--force-device-scale-factor). Affects screenshot resolution and CSS layout.Enable touch event emulation (
--touch-events=enabled).Browser locale passed via
--lang (e.g., "en-US", "de-DE").Network
Proxy configuration for all connections.
server: Proxy server URL (e.g.,"http://proxy.example.com:8080").bypass: Comma-separated hostnames to bypass the proxy.username: Proxy authentication username.password: Proxy authentication password.
Ignore TLS certificate errors (
--ignore-certificate-errors). Useful for testing against self-signed certificates.Downloads
Directory where Chrome saves downloaded files.
When
true, downloads are accepted automatically. When false, they are denied.Connecting to an existing browser
UsecdpUrl to skip launching a new Chrome process and connect to one that is already running.
WebSocket URL of an existing Chrome DevTools Protocol endpoint (e.g.,
"ws://127.0.0.1:9222/json/version"). When set, executablePath, port, headless, and related launch flags are ignored.Additional HTTP headers to include in the WebSocket upgrade request when connecting via
cdpUrl. Has no effect if cdpUrl is not set.Maximum time in milliseconds to wait for the CDP WebSocket connection to be established. Applies both to new launches and
cdpUrl connections.CreateContextOptions
Passed to browser.create() and context.createBrowserContext().
When
true, Chrome automatically disposes the browser context and its storage if the CDP connection drops unexpectedly.Proxy server URL for requests originating from this context (e.g.,
"http://proxy.example.com:8080").Comma-separated list of hosts that bypass the context’s proxy.
Origins granted unrestricted network access from within this context, bypassing CORS and mixed-content restrictions.