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

@howaboua/pi-browser

v0.0.18

Published

Logged-in browser inspection and control for Pi, Code Mode and Notebook Mode.

Readme

pi-browser

One logged-in browser tool for ordinary Pi, Code Mode and Notebook Mode.

The extension is the TypeScript counterpart of Pi Codex's browser custom tool. It keeps a persistent typed CDP session for the local browser, with action discovery, SSH host routing, batching, accessibility references, bounded continuations and screenshot paths.

Install

pi install npm:@howaboua/pi-browser

Requires the latest Pi release, Node.js 22.19 or newer, and a Chrome-family browser with remote debugging enabled at chrome://inspect/#remote-debugging.

Pi Codex 3.0.52 or newer is optional. Without it, Browser remains a normal top-level Pi tool. Do not load Pi Codex's example browser.toml custom tool alongside this extension.

Use

In normal Pi, call browser with {} to discover actions, then send JSON request strings in command. In Code or Notebook Mode, start with:

await tools.browser();

Code and Notebook calls return objects directly. Remove JSON.parse around browser results in saved code and helpers.

All modes accept the single-action and batched requests listed by the empty call. A common route is tabs, then open, then click or type with the returned ref_id and element ID.

Long Code and Notebook calls use the normal exec and wait lifecycle. Cancellation stops pending CDP work, though an already dispatched browser mutation may still take effect.

New tabs open in the background and belong to the current Pi session. Owned tabs keep rendering during control without being brought forward, except screenshots bring their target tab to the foreground for capture. The agent can filter the tab list to its own tabs, show a tab when you want to see it, and close any tab by reference. Existing tabs remain accessible through their refs and are not silently claimed.

Ownership survives extension reloads and managed-worker restarts while the browser and local runtime state remain. Restarting the browser makes restored tabs shared again. Popups inherit ownership through Chrome's opener metadata, but can still take focus. This tool does not install a Chrome extension or create Chrome tab groups.

Host routing

In Pi's interactive TUI, run /browser, add the SSH host names, identify the current machine, then save. An empty browser call lists the configured host choices. Advanced settings expose the remote Node command, which defaults to node.

Each name must be an existing SSH alias. On first use, the extension atomically installs or updates its managed worker at ~/.pi/agent/pi-browser-worker.mjs on that host, then invokes it against the host's local CDP browser. No package installation is required on routed machines. Screenshots return through SCP and the remote artifact is removed. Keep host on follow-up calls that use a returned ref, screenshot, or continuation handle. Settings are stored in pi-browser.json under Pi's agent directory; PI_BROWSER_CONFIG overrides that storage path.

To use Pi Browser only for voice startup, add "voiceOnly": true to pi-browser.json and reload Pi. For a new file, the entire configuration can be:

{ "voiceOnly": true }

The browser tool is unavailable to the agent, while voice startup and /browser host settings remain available. Keep any existing host routing fields in the same file. Remove the value or set it to false to restore the tool.

Browser startup

The tool discovers CDP through CDP_PORT, port 9222, or DevToolsActivePort. Set CDP_PORT_FILE for a non-standard port file.

The start action reuses a browser already listening on the configured CDP port. On Linux with a systemd user session, it uses xdg-settings to find the graphical desktop's default browser on the selected host. Over SSH, the host's systemd user session must know the graphical desktop environment. The action uses the browser's desktop launch command without creating a separate profile. A browser that does not support CDP may open, but the action reports success only when CDP responds.

Set CDP_BROWSER to explicitly choose a compatible executable and CDP_PROFILE_DIRECTORY to select a profile. If automatic startup is unsupported or the browser does not expose CDP, start the browser normally and enable remote debugging.

Boundaries

Keep each result's ref_id and element IDs together. Continue truncated output with the returned line, offset or result handle.

Ask before unfamiliar low-trust navigation or consequential external actions such as sending, posting, purchasing, uploading, deleting or changing account settings, unless the user already authorized the action. Never close a shared browser after a task.

The CDP implementation is based on pasky/chrome-cdp-skill.