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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@plutoxyz/devtools

v1.0.0

Published

React component for embedding Chrome DevTools with UI control capabilities

Downloads

2

Readme

@plutoxyz/devtools

A React component for embedding Chrome DevTools with UI control capabilities.

Features

  • 🔗 WebSocket Connection: Connect to Chrome DevTools Protocol
  • 🎛️ UI Controls: Hide/show sidebar and navigation elements
  • 🤖 Auto-hiding: Automatically hide DevTools UI for clean interfaces
  • 🔧 Configurable: Customizable DevTools base URL and behavior
  • 📦 TypeScript: Full TypeScript support with comprehensive types

Installation

npm install @plutoxyz/devtools
# or
yarn add @plutoxyz/devtools
# or
pnpm add @plutoxyz/devtools

Quick Start

import React, { useRef } from "react";
import { BrowserView, BrowserViewRef } from "@plutoxyz/devtools";

function App() {
  const browserRef = useRef<BrowserViewRef>(null);

  const handleConnect = async () => {
    const wsUrl = "ws://localhost:9222/devtools/page/your-page-id";
    await browserRef.current?.connect(wsUrl);
  };

  const handleHideSidebar = async () => {
    await browserRef.current?.hideSidebar();
  };

  return (
    <div>
      <button onClick={handleConnect}>Connect</button>
      <button onClick={handleHideSidebar}>Hide Sidebar</button>

      <BrowserView
        ref={browserRef}
        onConnectionChange={(connected) => console.log("Connected:", connected)}
        onError={(error) => console.error("Error:", error)}
      />
    </div>
  );
}

Props

| Prop | Type | Default | Description | | -------------------- | ------------------------------ | --------------------------------------- | ------------------------------------------ | | wsUrl | string | undefined | WebSocket URL for Chrome DevTools Protocol | | devToolsBaseUrl | string | "https://browser-inspector.pluto.xyz" | Base URL for DevTools iframe | | autoHideSidebar | boolean | true | Auto-hide sidebar on connection | | autoHideNavigation | boolean | true | Auto-hide navigation on connection | | onConnectionChange | (connected: boolean) => void | undefined | Connection state callback | | onError | (error: string) => void | undefined | Error callback | | className | string | "" | Additional CSS class | | style | React.CSSProperties | {} | Inline styles |

Ref Methods

The component exposes methods via ref:

interface BrowserViewRef {
  showSidebar(): Promise<void>;
  hideSidebar(): Promise<void>;
  hideNavigationBar(): Promise<void>;
  showNavigationBar(): Promise<void>;
  toggleNavigationBar(): Promise<boolean>;
  connect(wsUrl: string): Promise<void>;
  disconnect(): void;
  isConnected(): boolean;
}

Advanced Usage

Manual Control

import { BrowserView } from "@plutoxyz/devtools";

<BrowserView
  wsUrl="ws://localhost:9222/devtools/page/123"
  autoHideSidebar={false}
  autoHideNavigation={false}
  devToolsBaseUrl="https://your-custom-devtools.com"
/>;

Requirements

  • React 16.8+ (hooks support)
  • Modern browser with WebSocket support
  • Chrome/Chromium with debugging enabled

Chrome Setup

Launch Chrome with debugging enabled:

google-chrome --remote-debugging-port=9222 --disable-web-security --user-data-dir=/tmp/chrome-debug

License

MIT