Guide

CLI

Every command of the browsers CLI. Status lines on stderr and the page on stdout so a pipe gets only the page

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
extractStructured data from a prompt
searchWeb search through Hyperbrowser
sessioncreate, list and release
providersWho is configured and what they can do
mcpMCP server on stdio

browsers <command> --help has every flag. The ones you'll type most: -p for the provider, -o for the output file, -f for the format.

Who answers

Skip -p and the first configured provider in registry order gets the call. Steel if its key is set. Playwright if nothing else is. Commands for an optional operation look further: links on a Steel setup skips Steel, which has no links route, and so do pdf, crawl, extract, search, accessibility and a screenshot with --selector. scrape, a plain screenshot and session don't. With only ANCHOR_API_KEY set, scrape goes to Anchor and fails there, so pass -p playwright when that's what you mean.

shell
browsers providers
text
● steel           scrape screenshot(sess) sessions cdp
● browserbase     scrape sessions cdp
● kernel          scrape(sess) screenshot(sess) navigate evaluate sessions cdp
● browserless     scrape screenshot element navigate evaluate sessions cdp pdf
● hyperbrowser    scrape screenshot sessions cdp crawl search extract
● anchor          screenshot(sess) sessions cdp
● cloudflare      scrape screenshot element sessions cdp crawl pdf links extract accessibility
● playwright      scrape screenshot(sess) element navigate evaluate sessions crawl pdf links

A filled dot means that provider's key was in the environment on this run. Playwright is always filled. (sess) means the operation needs a session, which the command opens and closes for you.

Pipes

Status lines like ℹ Scraping via playwright... go to stderr. Stdout gets the page and nothing else, so this does what it looks like:

shell
browsers scrape https://example.com -p playwright -f html > page.html

A failure prints one ERROR line and exits with 1. Keys in a URL never make it into that line: query params such as token or api_key show up as [REDACTED].