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

@rezkam/browser-tools

v1.0.4

Published

Sandboxed, owner-token-protected Chrome automation for AI agents: control pages, record and review GIFs, capture HAR and raw CDP events, send CDP calls, and manage Chrome profiles.

Readme

@rezkam/browser-tools

Managed Chrome automation with isolated profiles and owner-protected sessions. Browser Tools can drive pages, inspect the DOM, capture visual and network evidence, and extract page content without connecting to or stopping your main Chrome.

This repository provides both the browser-tools skill and the @rezkam/browser-tools npm package. The skill uses the same CLI that the package installs.

Features

  • Isolated browser sessions: launch windowed or headless Chrome with a fresh profile or a copied Chrome profile, including existing site sessions and extensions.
  • Safe lifecycle management: every managed browser has an owner token. Browser Tools verifies process identity before connecting or stopping, limits concurrent browsers, and automatically reclaims old sessions after their recorded launcher exits.
  • Page control and inspection: navigate tabs, evaluate asynchronous JavaScript, take viewport or full-page screenshots, and interactively pick single or multiple DOM elements.
  • Page extraction: collect article-like links and nearby timestamps, or extract readable article text from the active tab.
  • Visual evidence: record an active-tab interaction as a GIF, then generate a sampled contact sheet and JSON metadata for review.
  • Network and protocol tooling: capture filtered HAR 1.2 traffic, extract a chronological request recipe, record selected raw CDP events, and send guarded CDP calls to the active tab.
  • Local profile configuration: discover Chrome profiles, create private aliases, and associate one or more profiles with a task.

Install

Install the skill when Browser Tools should be discoverable as an automation skill:

npx skills add rezkam/browser-tools

Install the package for the global CLI and programmatic exports:

npm install -g @rezkam/browser-tools

Commands can also run without a global install:

npx @rezkam/browser-tools <command>

Browser Tools requires macOS, Google Chrome, and Node.js 20 or newer. GIF recording and review additionally require ffmpeg and ffprobe:

brew install ffmpeg

Quick start

browser-tools start --headless
export BROWSER_TOOLS_OWNER_TOKEN="<owner token from start output>"

browser-tools nav https://example.com --port <reported port>
browser-tools eval 'document.title' --port <reported port>
browser-tools screenshot --full --port <reported port>

browser-tools stop --clean --port <reported port>

Use --profile "<profile or alias>" when an existing login is needed, --sync to refresh the copied profile, or --task <task> to use configured task profiles.

CLI capabilities

| Area | Commands | What they do | | --- | --- | --- | | Browser lifecycle | start, status, stop | Launch, inspect, stop, clean, reap, and prune managed Chrome sessions | | Profile configuration | config | Discover profiles, list active profiles, and manage task-to-profile mappings | | Page control | nav, eval, screenshot | Navigate the active tab or a new background tab, run page JavaScript, and capture PNG screenshots | | DOM inspection | pick | Select one or more visible elements and return tag, id, class, text, HTML, and parent information | | Page extraction | scrape-page, extract-article | Extract article-like links with timestamps or readable article text from the active tab | | Visual recording | record-gif, review-gif | Record an interaction with pre-roll and post-roll frames, then create a contact sheet and metadata report | | HTTP capture | record-har, extract-har | Capture filtered active-tab traffic and derive a compact, non-executable request recipe | | Chrome DevTools Protocol | record-cdp, cdp | Record selected raw protocol events or send one guarded direct method call |

Run browser-tools --help for the command list. Commands with detailed option references, such as record-har, record-cdp, and review-gif, also support command-level --help.

Safety model

  • Managed Chrome always uses a separate user data directory. Copied profiles are snapshots and never run against the live Chrome profile.
  • Commands that connect to Chrome or stop an owned browser require the owner token printed by start. The token protects browser control, recordings, network capture, CDP access, and shutdown.
  • Google identity data is removed from copied profiles by default to protect the source session. --include-google is an explicit opt-in for Google-backed workflows.
  • Starting without an explicit port can reuse a browser already owned by the caller or allocate another available port. The default concurrent browser limit is five.
  • A managed browser older than two hours becomes reclaimable after its recorded launcher exits. The next start reaps it before enforcing the concurrency limit, while browsers with live launchers remain protected regardless of age.
  • HAR files, extracted recipes, raw CDP events, and GIF review artifacts are written as private local files. Network and protocol output preserves exact evidence by default, with --redact available when sensitive values are not needed.
  • extract-har only describes captured requests. It does not execute or replay them. Known direct CDP methods that bypass managed-browser lifecycle controls are blocked.

Browser Tools stores local configuration under ~/.agents/browser-tools and managed profiles under ~/.cache/pi-browser-tools. Timestamped artifacts such as screenshots default to the system temporary directory, while derived outputs such as HAR recipes and GIF reviews stay beside their input files. The documented BROWSER_TOOLS_* environment variables override configurable locations.

For detailed ownership rules, profile behavior, capture filters, and command options, see the repository's SKILL.md and Browser Control reference.

Programmatic use

import { activePage, connectBrowser, startChrome, stopChrome, withBrowser } from '@rezkam/browser-tools';
import { runBrowserResource } from '@rezkam/browser-tools/resource-helper.mjs';

The root package export and @rezkam/browser-tools/browser-control.mjs both expose the browser lifecycle and connection module. The resource helper export provides the shared lifecycle for generic extractors.

Development

npm test             # Unit and CLI contract tests
npm run test:e2e     # Real Chrome and ffmpeg integration tests
npm run validate     # Full validation suite

License

Apache-2.0