npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@isoldex/sentinel

v4.2.1

Published

AI-powered browser automation with Gemini – fast, cheap Stagehand alternative

Readme

@isoldex/sentinel

npm version npm downloads License: MIT Docs

AI-powered browser automation for TypeScript. Describe what you want in plain English, Sentinel figures out the selectors, clicks, and extracts data.

Sentinel extracting GitHub trending repositories

Why Sentinel?

  • 10× fewer LLM tokens than Stagehand (2–5k per action vs 29–51k)
  • Self-healing selectors — cached after first run, auto-regenerate on break
  • Multi-LLM support — OpenAI, Claude, Gemini, Ollama
  • Built on Playwright — drop-in for existing Node.js projects

Install

npm install @isoldex/sentinel playwright
npx playwright install chromium

Gemini works out of the box. The other providers load their SDK on demand — install the one you use:

npm install @anthropic-ai/sdk   # ClaudeProvider
npm install openai              # OpenAIProvider
# OllamaProvider needs no package, just a running Ollama instance

Using the Playwright test fixture (@isoldex/sentinel/test) additionally requires @playwright/test.

Quick Start

import { Sentinel } from '@isoldex/sentinel';

const sentinel = new Sentinel({ apiKey: process.env.GEMINI_API_KEY! });
await sentinel.init();
await sentinel.goto('https://github.com/trending');

const result = await sentinel.run(
  'Extract the top 5 trending repositories with name, description, and star count'
);

console.log(result.data);
await sentinel.close();

Real-world example: Amazon.de

A more complex multi-step task — search, filter by brand, sort by rating, extract structured data:

Sentinel on Amazon.de: search + filter + sort + extract

Running the same task with the same model (Gemini 3 Flash), Sentinel completed in 5 steps / under 20s / 23k tokens / $0.0019. Stagehand timed out at 300s+ with one decision call alone consuming 210k tokens.

Full benchmark methodology and raw data: isoldex.ai/benchmark

Features

  • act() — natural language actions (click, fill, select, scroll)
  • extract() — structured data extraction with Zod schemas
  • run() — autonomous multi-step agent with goal-driven planning
  • fillForm() — declarative form filling with one JSON object
  • intercept() — capture API responses instead of scraping DOM
  • MFA/TOTP — auto-generate 2FA codes during login flows
  • CLI — npx sentinel run "goal" --url https://...
  • MCP Server — use Sentinel from Claude Desktop, Cursor, or any MCP client (stdio or standalone HTTP transport)

run() and fillForm() both accept maxSteps, timeoutMs, and an AbortSignal via their options. Cancellation and time budgets are checked between steps and after planning, before the next browser action starts.

Credentials

Either a Gemini apiKey or a custom provider — the type system enforces one of them, and providers carry their own credentials:

new Sentinel({ apiKey: process.env.GEMINI_API_KEY! });
new Sentinel({
  provider: new OpenAIProvider({ apiKey: process.env.OPENAI_API_KEY!, model: 'gpt-4o' }),
});
new Sentinel({ provider: new OllamaProvider({ model: 'llama3.2' }) }); // no key at all

Use variables for anything secret. The placeholder is resolved for the browser but never for a cache, so a file-backed cache stores %password% rather than the value:

await sentinel.act('Fill %password% into the password field', {
  variables: { password: process.env.APP_PASSWORD! },
});

Cancelling a run

runStream() stops the agent as soon as you stop consuming it — a break, an exception, or an SSE client disconnecting. Pass signal to cancel from elsewhere (e.g. request.signal):

for await (const event of sentinel.runStream(goal, { signal })) {
  if (isEnough(event)) break; // agent halts; no further tokens are spent
}

MCP server over HTTP

Defaults to 127.0.0.1:3333 with no authentication, which is safe only because it is loopback-only: requests are rejected unless Host and any Origin are loopback. Exposing it further requires a token, and the server refuses to start without one.

| Variable | Default | Purpose | | ----------------------------------------- | -------------------- | ---------------------------------------------------- | | SENTINEL_MCP_HTTP | – | Set to 1 for HTTP instead of stdio | | SENTINEL_MCP_HOST / SENTINEL_MCP_PORT | 127.0.0.1 / 3333 | Bind address | | SENTINEL_MCP_TOKEN | – | Bearer token. Required for a non-loopback host | | SENTINEL_MCP_ALLOWED_HOSTS / _ORIGINS | – | Comma-separated additions to the loopback allow-list | | SENTINEL_MCP_MAX_BODY_BYTES | 4194304 | Request body cap |

All requests share one browser session, so tool calls are serialised. HTTP mode decouples the client from the process; it is not a way to serve concurrent users.

Documentation

License

MIT