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

ui-grab

v0.1.35

Published

Open-source UI context picker for coding agents with built-in Shift multi-select

Readme

ui-grab

UI context picker for coding agents with built-in Shift + click multi-select.

ui-grab keeps the prompt UI and comment history flow, adds built-in Shift + click multi-select, and ships a separate MCP bridge so browser context picking can stay lightweight by default.

Packages

  • ui-grab: runtime, CLI, and public exports for ui-grab/core, ui-grab/primitives, and ui-grab/styles.css
  • ui-grab-mcp: optional MCP bridge for editor and agent integrations

Install

Recommended: guided setup

npx ui-grab@latest init

ui-grab init configures your project and installs ui-grab automatically unless you pass --skip-install.

Manual package install

pnpm add -D ui-grab

# npm
npm install -D ui-grab

Optional: local MCP bridge install

pnpm add -D ui-grab-mcp
npm install -D ui-grab-mcp

Use the published package names with hyphens: ui-grab and ui-grab-mcp.

If you already installed ui-grab manually with npm install -D ui-grab, npx ui-grab@latest init will still configure your project.

Quick Start

  1. Run npx ui-grab@latest init inside your project.
  2. Start your app in development mode.
  3. Hold Cmd+C on macOS or Ctrl+C on Windows/Linux briefly to activate UI Grab, unless you configured a custom activation key.
  4. Hover an element and click it to copy a single element.
  5. With UI Grab active, hold Shift and click multiple elements to build a grouped selection.
  6. Release Shift, type into the prompt textarea, and press Enter to submit.

MCP Bridge

pnpm add -D ui-grab-mcp
npx ui-grab@latest add mcp

Install ui-grab-mcp only if you want an MCP-capable agent to consume UI Grab payloads directly.

  • If you only want the in-browser picker, install ui-grab and stop there.
  • If you want Codex, Cursor, Claude Code, OpenCode, or another MCP-capable agent to read the latest picked UI context, enable the MCP bridge.
  • ui-grab add mcp writes agent config files that run ui-grab-mcp over npx.
  • A project-local ui-grab-mcp install is optional. It is useful when you want to pin the exact MCP version inside a repo or run the server locally yourself.

Manual Setup

Next.js (App Router)

import Script from "next/script";

export default function RootLayout(props: { children: React.ReactNode }) {
  return (
    <html>
      <head>
        {process.env.NODE_ENV === "development" && (
          <Script
            src="https://unpkg.com/ui-grab/dist/index.global.js"
            crossOrigin="anonymous"
            strategy="beforeInteractive"
          />
        )}
      </head>
      <body>{props.children}</body>
    </html>
  );
}

Next.js (Pages Router)

import Script from "next/script";
import { Head, Html, Main, NextScript } from "next/document";

export default function Document() {
  return (
    <Html lang="en">
      <Head>
        {process.env.NODE_ENV === "development" && (
          <Script
            src="https://unpkg.com/ui-grab/dist/index.global.js"
            crossOrigin="anonymous"
            strategy="beforeInteractive"
          />
        )}
      </Head>
      <body>
        <Main />
        <NextScript />
      </body>
    </Html>
  );
}

Vite

if (import.meta.env.DEV) {
  import("ui-grab");
}

Webpack

if (process.env.NODE_ENV === "development") {
  import("ui-grab");
}

Exports

  • Runtime entry: ui-grab
  • Core API: ui-grab/core
  • Primitives: ui-grab/primitives
  • Stylesheet: ui-grab/styles.css
  • CLI: ui-grab
  • MCP bridge: ui-grab-mcp

Support

License

UI Grab is distributed under the MIT license. Keep the original copyright notice and license text when redistributing forked code.