Skip to main content

PagePatrol

Open-source, local-first QA agent for web pages.

PagePatrol opens your page in a real browser at phone and desktop sizes and looks for the problems people actually run into: text that overlaps or gets cut off, text that is too small or too faint to read, layouts that scroll sideways on a phone, broken images and links, JavaScript errors and failed requests. Every finding comes with a screenshot that shows where it is.

Everything runs on your machine. The checks need no account and no API key. If you want, connect the AI model of your choice and it will look over the screenshots too, the way a human tester would.

Status: early development. Expect rough edges and breaking changes.

Quick start

uv tool install pagepatrol            # or: pipx install pagepatrol
pagepatrol install                    # one-time: download Chromium
pagepatrol check https://example.com
pagepatrol check ./site/index.html --open
pagepatrol check localhost:3000 -v mobile -v tablet -v 1440x900

check prints a summary and writes a report to .pagepatrol/runs/<time>/:

  • report.html with marked-up screenshots per viewport
  • report.json with every finding, for scripts and CI
  • screenshots/ with clean and annotated full-page captures

It exits with code 1 when it finds errors, so it can gate a CI job. Use --fail-on warning to be stricter or --fail-on never to only report.

AI review (optional)

pagepatrol init        # pick a provider and model, paste your key
pagepatrol check https://example.com --depth thorough

With a model set up, every check also sends the screenshots and the list of findings to it. The model:

  • confirms each finding, or marks it as intentional or a false alarm (those drop to notes, with the reason shown in the report)
  • points out visible problems the checks can't measure: text over busy images, broken alignment, placeholder text, error messages on the page

Supported: Anthropic, OpenAI, Google Gemini, OpenRouter, Ollama and any OpenAI-compatible server (LM Studio, vLLM and others). The model needs to accept images.

--depth Screens per viewport Effort
quick 2 low
balanced (default) 4 medium
thorough 12 high

What it costs

You pay your provider directly; PagePatrol itself is free. Every check prints how long it took, the tokens used and, when the model's price is known, an estimate of the cost. The report shows the same.

Measured on real pages with the default balanced depth at phone and desktop sizes:

Page Claude Sonnet 5.5 Claude Opus 5.5 Claude Haiku 5.5
Small page (one screen) ~$0.015 ~$0.03 <$0.001
Long page (Hacker News, MDN) ~$0.05 ~$0.10 ~$0.003

Opus and Haiku figures are scaled from the Sonnet runs by list price, so treat them as rough. --depth quick looks at fewer screens and costs about half; thorough looks at up to 12 screens per size and can cost three times as much on long pages. Prices for Claude models ship with PagePatrol (list prices as of 2026-10); for other providers init asks for them, and local models through Ollama are free.

Screenshots of the page go to the provider you picked. Use --no-llm for pages that shouldn't leave your machine, or a local model through Ollama.

Your API key

PagePatrol has no server. Your key stays on your machine and is only ever sent to the provider you chose, by that provider's official SDK.

It looks for a key in this order:

  1. PAGEPATROL_API_KEY
  2. the provider's usual variable: ANTHROPIC_API_KEY, OPENAI_API_KEY, GEMINI_API_KEY or OPENROUTER_API_KEY
  3. a key you pasted into pagepatrol init, kept in your system keyring (Windows Credential Manager, macOS Keychain, Secret Service on Linux)

If init finds the key in an environment variable it doesn't store it. On systems without a keyring, such as headless Linux, a pasted key goes to ~/.pagepatrol/credentials.toml, readable only by your user. pagepatrol config shows which source is in use without printing the key.

The key is never written to reports, screenshots or the terminal; a test checks this on every change. Pages under test run inside Chromium and can't reach it, and the model never sees it either.

What this doesn't protect against: anything that already runs as your user can read your keyring and environment, and so could a compromised dependency of any tool you run. PagePatrol keeps its dependencies few and is published from GitHub Actions through PyPI trusted publishing, with no long-lived token that could be stolen. If you find a security problem, please report it privately through GitHub's security advisories instead of a public issue.

What it checks

Check Level
overlap error / warning Text on top of text, or text and controls covering each other
horizontal-overflow error Elements that make the page scroll sideways
viewport-meta error No <meta name=viewport>, so phones show the desktop layout zoomed out
broken-image, broken-link error Images that don't load, links that return 404/410/5xx
js-exception, console-error error Uncaught exceptions and console errors
http-error, failed-request error Resources that fail or return 4xx/5xx
clipped-text warning / info Text cut off by its container
small-text warning Text below 12px
axe/* warning / info WCAG 2.2 A/AA rules from axe-core, including color contrast

Errors mean something is broken. Warnings are real quality problems on a page that still works. Notes are worth a look but may be intentional.

Development

Requires uv.

uv sync
uv run playwright install chromium
uv run pytest
uv run ruff check . && uv run ruff format --check .

tests/fixtures/ holds small pages that are broken on purpose, one per check. If you add a check, add a fixture that proves it fires and, where it makes sense, one that proves it stays quiet.

License

MIT. Bundles axe-core (MPL-2.0), see src/pagepatrol/checks/vendor/axe-core.LICENSE.

Metadata

Release files for pagepatrol 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pagepatrol 0.2.0
File Size Uploaded Provenance Actions
pagepatrol-0.2.0.tar.gz 225.5 kB Without provenance Details for pagepatrol-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pagepatrol 0.2.0
File Interpreter ABI Platform Actions
pagepatrol-0.2.0-py3-none-any.whl Python 3 none any Details for pagepatrol-0.2.0-py3-none-any.whl

Total release size: 453.8 kB

Release files / pagepatrol-0.2.0.tar.gz

Download URL pagepatrol-0.2.0.tar.gz
Size 225.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4623e028c978791faac2005f86a2a1c1141caf0f697d091cccad17f91653aee4
BLAKE2b-256 checksum
How to use checksums
aa616ec27f642b1d9af65f3ad54ee6bf3978aaea6e044db68d074894ca0ca8c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pagepatrol-0.2.0-py3-none-any.whl

Download URL pagepatrol-0.2.0-py3-none-any.whl
Size 228.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e67d9a0b7f430d9592e2a3020d33f230118d14dd43924c1f8db19a7fe8fc44b8
BLAKE2b-256 checksum
How to use checksums
5921d2f464f96942f133b1e326311895a60da11d841ce6f46dce178f3a1e1fcb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for pagepatrol 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page