Guide

CLI

CLI commands from the same tools used by MCP, Pi, OMP and the AI SDK.

One install gives you the browsers command. After pnpm add it's pnpm exec browsers, or install it once with pnpm add -g @agntn/browsers. Or skip installing entirely:

shell
npx @agntn/browsers scrape https://example.com -p playwright

Commands

CommandWhat it does
scrapeRendered page, markdown if the vendor has it
screenshotImage to a file, the page or one element
pdfThe page printed to a PDF file
crawlFollow links, or wait for a crawl job again
linksUnique hrefs, one per line
accessibilityRoles, names and states, one per line
webmcp-toolsThe WebMCP tools a page registers
webmcp-callRun one of a page's WebMCP tools
extractStructured data from a prompt
searchWeb search through Hyperbrowser
sessionOpen a session, answer with its ID
sessionsIDs of the sessions still open
releaseClose a session and stop the bill
providersWho is configured and what they can do
capabilitiesWhat one provider can do
mcpMCP server on stdio

Run browsers <command> --help for every flag. Use -p for the provider, -o for a screenshot or PDF file, and -f for the screenshot format. The flags are the tool's own arguments in kebab case, so maxPages is --max-pages.

Who answers

Skip -p and the first configured provider in registry order that can do the job gets the call. Steel if its key is set. Playwright if nothing else is. links on a Steel setup skips Steel, which has no links route. scrape, screenshot, pdf, crawl, extract, search, accessibility, webmcp-tools, webmcp-call and session create look past a provider the same way.

Only ANCHOR_API_KEY set? scrape walks past Anchor, which doesn't scrape, and lands on Playwright. Name a provider with -p and you get that one, refusal included.

shell
browsers providers
text
○ steel
○ browserbase
○ kernel
○ browserless
○ hyperbrowser
○ anchor
○ cloudflare
● playwright  scrape screenshot navigate evaluate sessions statelessScrape elementScreenshot screenshotWaitFor scrapeWaitFor crawl pdf links

A filled dot means that provider's key was in the environment on this run. Playwright is always filled. Where statelessScreenshot is missing, a screenshot needs a session, which the command opens and closes for you.

Pipes and errors

Stdout carries the tool's text. For scrape, the first line is [provider=…] url, followed by a blank line and the page. --json gives you details instead. For scrape, that's url, provider and contentLength, not the page.

A failure prints one line on stderr and exits with code 1. Keys in URLs appear as [REDACTED]. Misspelled a flag? The error points you to the right one. Nice.

shell
browsers scrape https://example.com --waitFor body
text
Invalid arguments: unknown option "--waitFor"; takes --provider (-p), --browser, --wait-for, --max-chars, --json