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

trawl-devices-agent

v0.32.0

Published

Local sidecar for the Trawl devices plugin — records and replays browser scenarios with Playwright.

Readme

trawl-devices-agent

Local sidecar for the Trawl devices plugin: records browser actions into a declarative JS DSL and replays them with Playwright.

Run

npx trawl-devices-agent@latest --workspace=/path/to/repo --port=8787

It prints the port and the bearer token; paste the token into the plugin once. The token also lives in ~/.trawl-devices/agent.json (mode 0600).

Install a browser once: npx playwright install chromium.

Flags: --workspace (default: ~/trawl-devices), --port (8787, next free port if taken), --proxy-port (8080, Trawl's proxy), --keep-runs (50), --ensure-browser (install the Playwright browser first — a no-op once it is there), --browser (chromium by default).

Trawl 1.8.0 and newer starts the agent for you from the Devices tab; running it by hand is the fallback.

Workspace layout

<workspace>/
  devices.json     # device registry, commit it
  scripts/*.js     # scenarios, commit them
  suites/*.json    # named lists of scenarios, commit them
  runs/<runId>/    # report.json, trace.zip, frames/*.jpg — gitignore this

Writing scripts

See skills/writing-device-scripts/SKILL.md — the same text the agent serves at GET /guide and that can be symlinked into ~/.claude/skills/.

Security model

The agent listens on 127.0.0.1 only and refuses any request that lacks the bearer token, carries an Origin header, or arrives with an unexpected Host header. GET /health answers without a token so the plugin can detect a running agent, and returns only the agent version in that case.

Scripts are not sandboxed against malice. node:vm keeps require, process and fetch out of scope so accidents stay contained, but a script runs with your privileges. Run only scripts you wrote or reviewed — the same trust model as Trawl plugins.

Secrets passed by the plugin are masked in reports, logs and API responses. Playwright traces cannot be masked, so a device that uses secret() should keep trace at on-failure (the default) rather than always.

API

| Method | Path | Purpose | | --- | --- | --- | | GET | /health | version, DSL version, known steps | | GET/POST | /devices | list / upsert devices | | POST/GET/DELETE | /sessions | start, list, stop browser sessions | | GET/POST | /scripts… | list, read, write, validate scripts | | POST/GET/DELETE | /runs… | start, poll, cancel runs | | POST/GET | /record… | start, inspect, stop a recording | | GET/POST | /suites… | list, read, write suites; run one and poll it | | POST | /heal | replay a failed run to its failing step and report the page | | POST | /control/snapshot, /control/do | live browser control | | POST | /shutdown | stop the agent (closing its browsers) so it can be replaced | | GET | /guide | the DSL reference |