Skip to main content
The examples/ folder in the repository holds short scripts for the Python and Node packages. Each script launches a headless browser and prints its results. They were run against Apostate 0.4.3 (Chromium 152.0.7977.83) on a macOS arm64 host on 27 September 2026. Apostate 0.5.1 composes the same machines, so only the Chrome version in the output moves.

Run them

Clone the repository, then install the package and run a script.
The Python scripts need Python 3.10 or later. The Node scripts need Node 22 or later, and puppeteer.mjs needs Node 22.12 or later, the minimum for puppeteer-core 25. In examples/node, npm install also installs Patchright and puppeteer-core.

Scripts

persistent_profile.py, persistent-profile.mjs and screenshot_and_pdf.py write next to themselves, into profiles/ and out/, which the repository ignores.

AI agents

examples/agents/ connects AI agents to Apostate. AI agents explains the choices.

Use cases

examples/use-cases/ holds one folder per use-case walkthrough. The Python scripts run from any directory and write their output next to themselves, in out/, profiles/, backups/ or prices.db, which the repository ignores. With no arguments, each one runs against a local test server, except web-archiving and account-profiles, which open https://example.com.

Docker

examples/docker/ holds a Dockerfile that installs the Python package, the browser, the Windows fonts and Xvfb, and check.py, which launches a Windows persona in the container and prints what a page reads. Docker explains how to build and run it.

Test suite

tests/ checks what pages read on a real browser and writes dated results. Test suite describes the checks, Run the tests runs them on your host, and Latest results lists the newest results per host.