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

pi-lean-dimension

v0.2.3

Published

Pi extension. The full Pi web-tools suite in one install — interactive browsing (pi-lean-portal) plus SearXNG search (pi-lean-search), unified under a /web toggle that removes the tools from context when switched off.

Readme

pi-lean-dimension

Web browsing and search tools for Pi, the AI coding agent.

A monorepo housing three Pi extension packages that give your AI agent the ability to browse the web interactively, fetch static pages as Markdown, and search via SearXNG — all toggled from a single /web command. When the toggle is off, the tools are removed from the agent's context entirely, so web browsing doesn't consume tokens or attention on sessions that aren't doing web work. The same surfaces are user-extensible: author navigation guides that resurface by domain, or drop in a stealth browser backend like Camoufox when a site blocks the shipped Chromium/Firefox.

Quick start (recommended)

pi install npm:pi-lean-portal
npx playwright install chromium firefox

That's it — the tools are registered and start enabled by default. Control them with /web on|off|learn (on = browser tools, learn = browser tools plus guide-saving via web-learn, off = everything off). The state persists per session. To set a different default for new sessions, add this to your Pi settings (~/.pi/agent/settings.json or .pi/settings.json):

{ "browserToggle": { "defaultEnabled": false } }

Install options

| Mode | Command | What you get | Requires | |---|---|---|---| | A — Browser (recommended) | pi install npm:pi-lean-portal | 12 browser tools + /web command | npx playwright install chromium firefox | | B — Full suite | pi install npm:pi-lean-dimension | 13 tools (browser + search) + /web | Playwright browsers + SearXNG server | | C — Search only | pi install npm:pi-lean-search | web-search tool only | SearXNG server |

Notes the table doesn't cover:

  • Browser binaries aren't downloaded during npm install (configured via .npmrc). The first browser-navigate call prompts you to run npx playwright install chromium firefox if they're missing.

  • SearXNG is optional for Mode B. The browser works immediately without it; web-search returns a clear setup message on first call. When you do run it, point the suite at your instance in Pi settings:

    { "searxng": { "url": "http://localhost:8888" } }
  • Search-only has no /web command — a single tiny tool has nothing to toggle.


What's included

Packages

| Package | Type | Description | |---|---|---| | pi-lean-portal | Extension | Interactive browser + /web command owner. 12 tools + 1 command. | | pi-lean-search | Extension | SearXNG search tool (web-search). 1 tool + 1 command (/searxng-status). | | pi-lean-dimension | Umbrella meta-package | Bundles portal + search for one-command install. |

Tools (13 total with search)

| Tool | Package | Purpose | |---|---|---| | browser-navigate | portal | Navigate to a URL, get an accessibility tree with @e element refs | | browser-snapshot | portal | Re-extract the current page's accessibility tree (@e refs) and capture a screenshot to a temp file | | browser-click | portal | Click an element by @e ref | | browser-type | portal | Type text into an input by @e ref | | browser-scroll | portal | Scroll the page | | browser-back | portal | Navigate back | | browser-press | portal | Press a key | | browser-console | portal | Read console messages from the page | | browser-inspect | portal | Query and extract text from elements | | web-fetch | portal | Stateless fetch → Markdown (no JS) | | web-guide | portal | Navigation guidance for a site or pattern | | web-learn | portal | Save/update navigation guidance | | web-search | search | Web search via SearXNG |

Commands

| Command | Owner | Description | |---|---|---| | /web on\|off\|learn\|cookies\|profile\|status | portal | Unified toggle and management | | /searxng-status | search | Test SearXNG connection and update status glyph |

Status bar

When search is installed, two independent glyphs appear:

  • ● idle (browser) — browser tools enabled
  • ● searxng (search) — SearXNG health (accent=healthy, yellow=degraded, red=unreachable)

Extending it

Beyond the /web toggle, two surfaces are user-driven rather than hardcoded:

  • Navigation guidesweb-learn saves site-specific playbooks that auto-match by domain and resurface in later sessions.
  • Custom browser backends — if a site blocks the shipped Chromium/Firefox, drop a bridge.py subclass into ~/.pi/agent/pi-lean-portal/user-backends/ and drive a patched engine like Camoufox yourself. A quirks schema declares how the engine diverges from base Playwright, and launch options flow from settings.json to the subprocess at runtime. This is user-authored, user-audited code that the extension never auto-downloads. Most installs never need it; the portal README and contributed/README.md cover the full flow when you do.

Development

git clone https://github.com/coreyryanhanson/pi-lean-dimension.git
cd pi-lean-dimension
npm install
npm test                    # vitest run — all workspace tests

License

AGPL-3.0-only