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

genai-electron

v0.3.1

Published

Electron-specific library for managing local AI model servers and resources

Readme

genai-electron

Version: 0.3.0 | Status: Production Ready - LLM & Image Generation

Electron-specific library for managing local AI model servers (llama.cpp, stable-diffusion.cpp). Handles platform-specific operations to run AI models locally. Complements genai-lite for API abstraction.

Features

  • System detection - Auto-detect RAM, CPU, GPU, VRAM capabilities
  • Model management - Download GGUF models with progress tracking and metadata extraction
  • LLM server - Manage llama-server lifecycle with auto-configuration
  • Image generation - Local image generation via stable-diffusion.cpp
  • Resource orchestration - Automatic LLM offload/reload when memory constrained
  • Binary management - Automatic binary download with GPU variant testing (CUDA→Vulkan→CPU)
  • TypeScript-first - Full type safety, zero runtime dependencies

Installation

npm install genai-electron
npm install electron@>=25.0.0  # Peer dependency

Quick Start

import { app } from 'electron';
import { systemInfo, modelManager, llamaServer } from 'genai-electron';

app.whenReady().then(async () => {
  // Detect capabilities
  const caps = await systemInfo.detect();
  console.log('RAM:', (caps.memory.total / 1024 ** 3).toFixed(1), 'GB');

  // Download model (if needed)
  await modelManager.downloadModel({
    source: 'url',
    url: 'https://huggingface.co/TheBloke/Llama-2-7B-GGUF/resolve/main/llama-2-7b.Q4_K_M.gguf',
    name: 'Llama 2 7B',
    type: 'llm'
  });

  // Start server with auto-config
  await llamaServer.start({
    modelId: 'llama-2-7b',
    port: 8080
  });

  console.log('Server ready on port 8080');
});

Use with genai-lite for AI interactions (chat, image generation).

Documentation

📚 Complete Documentation - Full API reference, guides, and examples

Quick Links:

Example App

See electron-control-panel for a full-featured reference implementation.

Platform Support

  • macOS: 11+ (Intel, Apple Silicon with Metal)
  • Windows: 10+ (64-bit, CPU and CUDA)
  • Linux: Ubuntu 20.04+, Debian 11+, Fedora 35+ (CPU, CUDA, ROCm)

License

MIT License - see LICENSE file for details.

Related Projects

  • genai-lite - Lightweight API abstraction for AI providers (cloud and local)