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

@xgauravyaduvanshii/sesy-guard

v0.1.1

Published

Prevent Electron from crashing in SSH/headless environments. Part of the sesy toolkit.

Readme

sesy toolkit

Node >= 18 MIT License Repository

Remote Electron development usually breaks in two places: the remote Electron main process crashes because there is no display server, and even when the renderer port exists, there is no native Electron window on your local machine. This repository contains both halves of that fix.

What lives here

  • @xgauravyaduvanshii/sesy-guard: the package installed inside the remote Electron project to keep Electron alive in SSH and headless environments
  • @xgauravyaduvanshii/sesy: the CLI in cli/ that watches the forwarded port on your local machine and opens a real Electron window locally

Repository: https://github.com/xgauravyaduvanshii/sesy.git
Author: xgauravyaduvanshii <[email protected]>

sesy toolkit overview

Repository map

windowworker/
├── README.md                 # toolkit overview
├── package.json              # sesy-guard package
├── src/                      # sesy-guard runtime
├── docs/                     # sesy-guard docs
├── tests/                    # sesy-guard tests
├── cli/                      # full sesy CLI package
│   ├── package.json
│   ├── bin/
│   ├── src/
│   ├── docs/
│   └── tests/
└── .github/                  # repo automation and collaboration files

Architecture

flowchart LR
    A[Remote Electron project] --> B[sesy-guard]
    B --> C[Renderer dev server stays alive]
    C --> D[SSH port forwarding]
    D --> E[sesy CLI on local machine]
    E --> F[Local Electron BrowserWindow]

Package 1: @xgauravyaduvanshii/sesy-guard

@xgauravyaduvanshii/sesy-guard is the remote-side safety layer. It prevents Electron from crashing when there is no X11, Wayland, or usable display stack.

sesy-guard runtime

What it does

  • detects SSH and headless environments
  • injects Electron startup flags before app.whenReady()
  • lets the renderer dev server continue booting
  • helps teams skip BrowserWindow creation on the server

Typical integration

import { app } from 'electron';
import { initSesyGuard, isSshMode } from '@xgauravyaduvanshii/sesy-guard';

const mode = initSesyGuard();

app.whenReady().then(() => {
  if (!isSshMode()) {
    createWindow();
  }
});

@xgauravyaduvanshii/sesy-guard structure

src/
├── index.js          # public API
├── index.cjs         # CommonJS export
├── index.d.ts        # TypeScript declarations
├── detector.js       # SSH/headless detection
├── injector.js       # Electron flag injection
├── errors.js         # custom error types
└── logger.js         # zero-dependency logger

@xgauravyaduvanshii/sesy-guard key docs

Package 2: @xgauravyaduvanshii/sesy CLI

The CLI is the local-side experience. It watches the forwarded localhost port and restores the missing native window on your own machine.

What it does

  • loads per-project config from .sesy.json
  • waits patiently for the forwarded dev server
  • launches a real local Electron window when the port responds
  • provides init, watch, status, and doctor commands

CLI flow

sequenceDiagram
    participant Dev as Developer
    participant SSH as SSH tunnel
    participant Port as localhost:8000
    participant Sesy as sesy CLI
    participant Electron as Local Electron

    Dev->>SSH: forward remote renderer port
    Dev->>Sesy: run sesy watch
    Sesy->>Port: poll HTTP endpoint
    Port-->>Sesy: first live response
    Sesy->>Electron: spawn local BrowserWindow
    Electron-->>Dev: native desktop app opens

CLI project structure

cli/
├── bin/sesy.js
├── src/
│   ├── commands/
│   ├── core/
│   ├── utils/
│   └── constants.js
├── docs/
├── tests/
└── README.md

CLI key docs

When to use which package

| Situation | Package | |---|---| | Remote Electron crashes immediately on SSH | @xgauravyaduvanshii/sesy-guard | | Renderer is alive but you need a local native window | @xgauravyaduvanshii/sesy CLI | | Full remote Electron development workflow | both together |

End-to-end workflow

  1. Install @xgauravyaduvanshii/sesy-guard in the remote Electron project.
  2. Add the guard initialization at the top of the Electron main process.
  3. Start the remote dev server over SSH.
  4. Forward the renderer port to your local machine.
  5. Install and run the @xgauravyaduvanshii/sesy CLI locally.
  6. Let sesy open the Electron window on your own machine.

Development and verification

Root package

npm install
npm test

CLI package

cd cli
npm install
npm test

Collaboration

This repository also includes:

Maintainer

License

MIT