Open source · MIT · TypeScript
Ghostwright
Browser agents that replay without a model.
$ npm i ghostwright$ npx tsx examples/replay.ts
recorded: 11 titles, extract compiled to "css", 2 model calls
replayed: 11 titles, 0 model calls, 538 ms
First run vs replay
4 flows on public test sites. 3 recordings and 12 replays each. 2026-11-19.
Why Ghostwright
0 model calls on replay
Record a flow once. Later runs replay it. A broken step is repaired with one call, then kept or held for review.
Secrets by reference
The model sees
%password%. The value is typed only on sites you allow, never saved.Runs where your browser is
Local Chrome, any CDP endpoint, or Browsa cloud browsers. Any model.
import { Ghostwright } from "ghostwright";
import { z } from "zod";
const gw = await Ghostwright.create({ model: "openai/gpt-5.6-luna" });
const flow = await gw.flow("travel-books", { params: { category: "Travel" } });
await flow.goto("https://books.toscrape.com/");
await flow.act("open the %category% category");
await flow.extract("every book title", z.object({ titles: z.array(z.object({ title: z.string() })) }));
await flow.save();
const run = await gw.run("travel-books", { category: "Poetry" }); // 0 model calls
await gw.close();Run it on Browsa cloud browsers.
The same flows, on Phantom, with captchas solved on the server.
browser: browsa({ apiKey: process.env.BROWSA_API_KEY })100 free credits. No card.