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

electrobun-devtools

v0.2.4

Published

Dev-mode instrumentation lib for Electrobun apps. Drop into your `src/bun/index.ts` to expose runtime state to the electrobun-plugin MCP server (Claude Code). Read more at https://github.com/arijit-gogoi/electrobun-plugin

Readme

electrobun-devtools

Dev-mode instrumentation library for Electrobun apps. Companion to the electrobun-plugin Claude Code plugin — exposes your running app's state to the plugin's MCP server so Claude can read RPC traffic, watch FFI calls, eval in main process, inspect the updater, tail native logs, and more.

Dev only. Refuses to start when NODE_ENV === "production". Do not ship in your production build.

Install

bun add -d electrobun-devtools

Use

// src/bun/index.ts
import { BrowserWindow } from "electrobun/bun";
import { devtools } from "electrobun-devtools";

if (process.env.NODE_ENV !== "production") {
  await devtools.start({ port: 9876 });
}

new BrowserWindow({ url: "views://mainview/index.html" });

On first run, devtools.start():

  1. Generates a session token, prints it to stdout: [electrobun-devtools] token: xyz123...
  2. Writes the token to .electrobun-devtools-token in your project dir (gitignored).
  3. Listens on localhost:9876 for the MCP server to connect.

You paste the token into Claude Code once (see plugin instructions). Reuse across sessions.

To rotate the token: delete the file, OR call devtools.start({ forceToken: true }).

What the plugin gets access to

Once connected, the electrobun-plugin MCP exposes tools to Claude:

  • electrobun_list_windows() — enumerate BrowserWindow instances.
  • electrobun_rpc_log() — recent bun↔webview RPC traffic.
  • electrobun_ffi_log() — recent native FFI calls.
  • electrobun_bun_eval(code) — evaluate in the main process. Gated. Requires allowEval: true in plugin user-config; off by default.
  • electrobun_updater_state() — current Updater state.
  • electrobun_app_log() — recent bun process console output.
  • electrobun_native_log() — platform-native log tail. Currently Windows-only in this version.

Security model

  • All tools require auth via the session token. No token in WS handshake = connection refused.
  • bun_eval requires plugin user-config allowEval: true opt-in. Default is off.
  • Token file .electrobun-devtools-token is gitignored. Do not commit.
  • Listens on localhost only. Not reachable from network.
  • Refuses to start in production.

Version coupling

electrobun-devtools is version-locked with electrobun-plugin. Major.minor must match. If they don't, the plugin refuses to connect and prints an upgrade message. Bump both together.

License

MIT.