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

@albeorla/web-automation-kit

v1.0.3

Published

General-purpose web workflow recording kit

Readme

web-automation-kit

A general-purpose, file-based workflow recorder for web apps (TypeScript + Playwright). You drive the browser manually; the kit records what happens: API requests/responses, navigations, form submits, and optional screenshots. This is intended to be shared infra: keep domain specifics (URLs, schedules, downstream parsing, naming conventions) in consumer repos.

What This Repo Contains

The core is src/recorder/ (browser + recording) and src/runs/ (run index). Local helpers live in scripts/ and justfile.

The kit writes data relative to the current working directory (your domain repo): data/.auth-state.json, data/runs/, and runs-index.json. Most consumer repos should gitignore data/ (and often runs-index.json as well).

Install

npm install
npx playwright install chromium
npm run build

How It’s Consumed (Domain Repos)

The intended model is “run the kit from the domain repo root”. That keeps data and config in the domain repo, while the recorder stays generic.

If you want a wrapper, a simple domain justfile can call the kit directly:

# in your domain repo justfile
auth:
    npx web-automation-kit auth

record:
    npx web-automation-kit record

status:
    npx web-automation-kit status

Configuration can live in .env or config.json. Environment variables win over config.json.

Minimal .env:

SOURCE_LOGIN_URL=https://example.com/login

Optional URL hints (helps auth detection):

AUTH_LOGIN_URL_HINTS=/login,/signin,/auth
AUTH_SUCCESS_URL_HINTS=/app,/dashboard

Minimal config.json (schema: config/config.schema.json):

{ "schema_version": "1", "source_login_url": "https://example.com/login" }

Validate config quickly:

just validate-config

Template Repo

For a ready-to-fork consumer skeleton, see ~/dev/web-automation-kit-template. It ships a minimal CLI wrapper and example config using this package.

Library Usage (Optional)

You can import the recorder from another project and provide config overrides programmatically:

import { recordWorkflow, setConfig } from '@albeorla/web-automation-kit';

setConfig({
  rootDir: process.cwd(),
  overrides: {
    SOURCE: { LOGIN_URL: 'https://example.com/login' },
  },
});

await recordWorkflow({ screenshots: true });

Consumer Helpers

If a consumer repo wants to avoid direct dotenv or playwright dependencies, it can import them from this package instead:

import '@albeorla/web-automation-kit/env';
import { chromium, type Page } from '@albeorla/web-automation-kit/playwright';

This keeps consumer package.json lean and centralizes dependency updates in the kit.

Run

Authenticate once (saves data/.auth-state.json):

npx web-automation-kit auth

Record a workflow (stop with Ctrl+C):

npx web-automation-kit record
# or: npx web-automation-kit record --screenshots

View recent runs:

npx web-automation-kit status

Output Format

Each run creates data/runs/<run-id>/ with step-numbered files like 00_metadata.json, *_page_navigation.json, *_graphql_request.json, *_graphql_response.json, *_rest_request.json, *_rest_response.json, *_form_submit.json, and optional *_screenshot.png. The exact sequence depends on the workflow you record.

Note: form submit capture currently includes field values. If that is too sensitive for a given domain, the consumer repo should patch src/recorder/capture.ts or wrap/disable that hook.

Scheduling (Per Domain)

This repo intentionally does not ship domain jobs. Follow the pattern from ~/dev/launchd-kit: domain repos define their own job scripts and plists, and use launchd-kit to install/reload/status. A template plist for the future replay feature lives at scripts/com.user.web-automation-kit.replay.plist.

How It’s Extended (Collaborators)

This repo should stay “boringly generic”. Collaborators typically extend it in one of two ways.

Domain extension lives in the consumer repo: parse captured JSON, derive domain schema, schedule captures, and add any alerting/monitoring. Treat the recorder output as raw evidence and build the domain meaning elsewhere.

Recorder extension lives here: add new capture capabilities that are broadly useful (redaction, extra event types, better request classification, stability improvements). Avoid hardcoding domains (URLs, selectors, request names) and prefer config flags when behavior needs to vary.

Development

Build: npm run build
Typecheck: npm run typecheck
Clean: npm run clean