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-automation

v0.2.0

Published

Automation toolkit for pi coding agent: web access, browser (CDP), screen/window tools, and Windows UI Automation (System.Windows.Automation).

Downloads

136

Readme

pi-automation

Automation toolkit for the pi coding agent. Aggregates web access, browser control, screen/window tools, and native Windows UI automation into a single extension.

Tools

| Tool | Source | Description | |------|--------|-------------| | web_search | pi-web-access | Web search (multiple providers) | | source_check | pi-web-access | Verify a claim with source citations | | fetch_content | pi-web-access | Fetch URLs (GitHub / PDF / video / YouTube) | | get_search_content | pi-web-access | Retrieve stored search/fetch content | | browser | local | Drive a real browser via CDP (launch/list/navigate/click/type/js/read/wait/screenshot/close) | | take_screenshot | local | Capture screen (single/stitched/region/scale) | | hide_window | local | Hide / show a window | | ui_automation | local | Read & operate native Windows UI controls |

Commands (from pi-web-access): /websearch, /curator, /google-account, /search. Shortcuts: Ctrl+Shift+S (curate), Ctrl+Shift+W (activity).

ui_automation actions

Target a window via process (name/PID), window_title, or window_handle (hex). Match controls by name, automation_id, or control_type.

Control actions

  • list_windows — list top-level windows
  • list_controls — enumerate a window's control tree
  • find — find controls by name / controlType / automationId
  • click — invoke a control (InvokePattern, or focus+click fallback)
  • click_coords — mouse click at x, y. Supports button (left/right/middle) and click_count. With relative: true, x/y are offsets from the relative_to origin instead of absolute screen coords (default relative_to: "desktop" = virtual desktop top-left, or "window" = target window top-left).
  • set_value / get_value — ValuePattern (edit boxes)
  • get_text — TextPattern (read text content)
  • focus — move focus to a control
  • toggle — TogglePattern (checkbox / switch)
  • set_range / get_range — RangeValuePattern (slider / numeric)
  • select — SelectionItemPattern (list item)
  • scroll — ScrollPattern (amount, scroll_axis)
  • expand / collapse — ExpandCollapsePattern

Window actions

  • window_minimize / window_maximize / window_restore / window_close
  • window_move — move window to (x, y)

find / list_controls report each control's supported patterns.

Architecture

  • Reuses pi-web-access as an npm dependency (bundledDependencies), calling its default extension export.
  • index.ts wires webAccess(pi) plus registerBrowser, registerScreen, and registerUiAutomation.
  • Local modules:
    • browser.tsregisterBrowser (browser)
    • screen.tsregisterScreen (take_screenshot, hide_window)
    • ui-automation.tsregisterUiAutomation (ui_automation)

Install

As a pi package

Add the repo to pi's settings.json:

{
  "extensions": ["D:/pi-automation"],
  "packages": []
}

Copy to the auto-discovery folder

Copy this package to pi's global extensions dir and install deps:

C:\Users\Admin\.pi\agent\extensions\pi-automation\
cd pi-automation && npm install --omit=dev

Avoid tool name collisions

This package registers browser, take_screenshot, hide_window, and the web tools. Disable old sources before enabling it:

  • ~/.pi/agent/extensions/browser-cdp.ts (browser)
  • ~/.pi/agent/extensions/screen-tools.ts (take_screenshot, hide_window)
  • settings.json packages: remove "npm:pi-web-access"

Then run /reload.

Development

cd D:/pi-automation
npm install --omit=dev      # install runtime deps
npm run typecheck           # optional TS check
git add -A && git commit -m "..."   # commit

To test loading in pi: pi -e D:/pi-automation, or /reload.

Notes

  • ui_automation, take_screenshot, hide_window are Windows-only; other platforms register no-op/not available tools.
  • Reusing pi-web-access also brings its commands and shortcuts.