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

rivet-electron-plugin

v0.1.8

Published

Rivet plugin for Electron apps - enables element selection and live editing

Readme

rivet-electron-plugin

Rivet plugin for Electron apps - enables live visual editing and element selection in Electron applications.

Installation

npm install rivet-electron-plugin

Usage

Basic Setup

In your Electron app's renderer process, initialize the Rivet plugin:

import { initializeRivet } from 'rivet-electron-plugin';

// Initialize with default settings
initializeRivet();

Custom Configuration

import { initializeRivet } from 'rivet-electron-plugin';

initializeRivet({
  serverUrl: 'ws://localhost:4000/api/electron/ws', // Rivet server WebSocket URL
  autoConnect: true, // Auto-connect on initialize
  logLevel: 'error', // Log level: 'debug' | 'info' | 'warn' | 'error' | 'none'
});

Log Levels

Control how much the plugin logs to the console:

  • 'debug' - All logs (connection, messages, errors)
  • 'info' - Info, warnings, and errors
  • 'warn' - Warnings and errors only
  • 'error' - Errors only (default)
  • 'none' - No logs
initializeRivet({
  logLevel: 'debug', // Verbose logging for development
});

Manual Connection Control

import { RivetPlugin } from 'rivet-electron-plugin';

const plugin = new RivetPlugin({
  autoConnect: false,
  logLevel: 'debug',
});

// Connect when ready
await plugin.connect();

// Disconnect when done
plugin.disconnect();

How It Works

  1. Start Rivet: Run rivet --framework electron in your project directory
  2. Initialize Plugin: Add initRivet() to your Electron renderer process
  3. Connect: The plugin connects to Rivet server via WebSocket
  4. Select Elements: Click "Edit Mode" in Rivet UI, then click elements in your Electron app
  5. Modify: Use AI to modify selected elements - changes are written to your source files

Events

The plugin emits custom events you can listen to:

// Listen for file modifications
window.addEventListener('rivet:files_modified', (event) => {
  const files = event.detail;
  console.log('Rivet modified these files:', files);

  // Optionally trigger your own hot reload logic
});

Requirements

  • Electron >= 20.0.0
  • Rivet CLI running with --framework electron flag

Example Electron Setup

// src/renderer/index.ts
import { initializeRivet } from 'rivet-electron-plugin';

// Wait for DOM to be ready
document.addEventListener('DOMContentLoaded', () => {
  // Initialize your app
  initApp();

  // Initialize Rivet in development mode only
  if (process.env.NODE_ENV === 'development') {
    initializeRivet({
      logLevel: 'error', // Only show errors in console
    });
  }
});

License

MIT