Skip to main content
Capture and extraction commands let you read data out of the browser — as images, documents, raw HTML, JavaScript return values, or structured network archives. Use these commands to build evidence bundles, verify page state, extract data for downstream processing, or record flows for replay and audit.

gsd-browser screenshot

Capture a screenshot of the current page and return it as a base64-encoded image. When you pass --output, the raw image bytes are written directly to a file on disk instead.
string
File path where the image should be saved (e.g. ./screenshots/page.png). When set, the command writes raw bytes to disk and prints a confirmation line instead of returning base64 data.
string
CSS selector of a single element to capture. The screenshot crops to that element’s bounding box and always produces a PNG, ignoring the --format flag.
flag
Capture the entire scrollable page height, not just the current viewport.
number
JPEG compression quality from 1 (lowest) to 100 (highest). Defaults to 80. Has no effect when the format is png.
string
Image format: jpeg (default) or png. Element screenshots (--selector) are always PNG regardless of this setting.
Examples

gsd-browser save-pdf

Export the current page as a PDF file. The PDF is rendered using the browser’s built-in print engine, which honours CSS print stylesheets.
string
Full file path for the saved PDF (e.g. ./exports/report.pdf). When omitted, the file is saved to the session directory and the path is printed.
string
Output filename (used when you want the file saved to the default session directory with a specific name).
string
Page size: A4 (default), Letter, Legal, or Tabloid.
flag
Include background graphics and colours in the PDF output. Enabled by default; pass --print-background false to disable.
Examples

gsd-browser page-source

Return the HTML source of the current page or a scoped element.
string
CSS selector to scope the source output to a specific element. Omit to retrieve the full page source.
Examples

gsd-browser eval

Evaluate a JavaScript expression in the context of the current page and return its result. Use --json to parse the return value as structured JSON rather than a plain string.
string
required
Any valid JavaScript expression. The expression runs in the page’s global scope and has access to window, document, and all page globals.
Examples

gsd-browser har-export

Export all captured network traffic for the current session as a HAR 1.2 JSON file. The network buffer accumulates requests continuously; call this command at any point to flush the buffer to disk.
string
Output file path for the HAR file (e.g. ./session.har). When omitted, the file is saved to the session directory and the path is printed.
Examples
The network buffer accumulates across the entire session. Call gsd-browser network --clear if you want to start a fresh capture window before running a specific flow.

gsd-browser record-start / gsd-browser record-stop

Record a named flow session that captures actions, screenshots, and network activity into an evidence bundle. Start the recording before performing actions; stop it when the flow is complete.
string
required
A human-readable name for this recording (e.g. checkout-flow-2026-06). The name is used as part of the bundle filename and is shown in the recordings list.
Additional recording commands Examples

gsd-browser debug-bundle

Capture a complete debug bundle — screenshot, console log, network log, timeline, and accessibility tree — in a single command. Use this to collect all diagnostic evidence at a point in time.
string
Optional suffix to append to the bundle directory name, making it easier to identify in the file system.
Example