CLI

The pagereflect CLI

Updated Jun 2, 20264 min read
Examples
On this page

Install & auth

The CLI ships in the same `pagereflect` package as the MCP server. Run it with `npx -y pagereflect <command>`; no global install is required. Authentication is the `PAGEREFLECT_API_KEY` environment variable, using a key from Settings, API keys (see API keys).

For a self-hosted or preview instance, set `PAGEREFLECT_API_URL` to point at it.

HTTP
export PAGEREFLECT_API_KEY=sk_pageref_...
npx -y pagereflect account
npx -y pagereflect audit https://example.com

Commands

`account` shows the connected organization and key. `audit <url>` runs an audit with live progress, and takes an optional `--site` to attach it to an existing site. `run <runId>` shows a run's status. `report <reportId>` prints a report and accepts `--format json` or `--format pdf_url`.

`sites` lists your sites, `history <siteId>` shows recent runs (with `--limit`), and `schedule <siteId>` shows the re-audit schedule. These mirror the API reference exactly.

MCP mode

Running `pagereflect mcp` starts the stdio MCP server instead of a one-shot command. That is the mode Claude Desktop and Claude Code use; see Connect PageReflect to Claude with MCP.

Feedback

Was this page helpful?

The pagereflect CLI — PageReflect docs