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

swarmy

v0.3.16

Published

Distributed container management with browser-based VNC and terminal access

Readme

Swarmy

Distributed container management with browser-based VNC and terminal access.

Provision ephemeral Docker containers across multiple nodes and interact with them through a web dashboard — full desktop GUI via VNC and interactive terminal sessions, all in the browser.

Architecture

┌─────────────────────────────────────────────────────┐
│                   Browser Client                    │
│             React + xterm.js + noVNC                │
└──────────┬───────────────────────────┬──────────────┘
           │ WebSocket (UI/session/VNC)│ REST API
           ▼                           ▼
┌─────────────────────────────────────────────────────┐
│                     Manager                         │
│        Express.js · SQLite · WebSocket Hub          │
└──────────┬──────────────────────────────────────────┘
           │ WebSocket (/ws/worker)
     ┌─────┴─────┐
     ▼           ▼
┌──────────┐ ┌──────────┐
│ Worker   │ │ Worker   │  ...
│ Docker   │ │ Docker   │
│ node-pty │ │ node-pty │
└──────────┘ └──────────┘
  • Manager — Central server with React dashboard. Maintains state in SQLite, brokers WebSocket communication between workers and browser clients.
  • Worker — Node agent on each machine. Manages Docker containers, PTY sessions, and VNC proxy connections.
  • swarmy-base — Docker image (Ubuntu 24.04) with TigerVNC, Fluxbox, noVNC, Chrome, and s6-overlay for process supervision.

Quick Start

Prerequisites

  • Node.js (v24+ recommended)
  • Docker
  • npm

Using npx (recommended)

Manager:

npx --yes swarmy@latest manager start

Sign in with Google, then add nodes from the Settings page. Each node gets a unique token.

Worker (on each node):

npx --yes swarmy@latest worker start --url http://<manager-ip>:5174 --token <node-token>

Other commands:

npx --yes swarmy@latest manager status     # Show PID
npx --yes swarmy@latest manager stop       # Stop manager
npx --yes swarmy@latest manager restart    # Restart manager
npx --yes swarmy@latest worker status      # Show worker PID
npx --yes swarmy@latest worker stop        # Stop worker

From source (development)

Manager:

cd manager
npm install
npm run dev

The manager starts on port 5174. Sign in with Google to access the dashboard.

Worker (on each node):

cd worker
npm install
SWARM_URL=http://<manager-host>:5174 SWARM_TOKEN=<node-token> npm run dev

Docker Image

scripts/build.sh                    # Build swarmy-base image (linux/amd64)
scripts/run.sh                      # Run a standalone container
PORT=8080 RESOLUTION=1280x720 scripts/run.sh my-browser  # Custom settings

Production Deployment

Manager:

npx --yes swarmy@latest manager start \
  --firebase-service-account '{"type":"service_account",...}' \
  --firebase-api-key "YOUR_API_KEY" \
  --firebase-auth-domain "YOUR_PROJECT.firebaseapp.com" \
  --firebase-project-id "YOUR_PROJECT_ID"

Or use a .env file in the working directory (see Environment Variables below).

Worker:

npx --yes swarmy@latest worker start --url http://<manager-ip>:5174 --token <node-token>

Environment Variables

| Variable | Component | Description | | ------------------------------ | --------- | -------------------------------------- | | PORT | Manager | HTTP port (default: 5174) | | FIREBASE_SERVICE_ACCOUNT_JSON| Manager | Firebase service account (raw JSON) | | VITE_FIREBASE_API_KEY | Manager | Firebase API key (build-time) | | VITE_FIREBASE_AUTH_DOMAIN | Manager | Firebase auth domain (build-time) | | VITE_FIREBASE_PROJECT_ID | Manager | Firebase project ID (build-time) | | SWARM_URL | Worker | Manager URL to connect to | | SWARM_TOKEN | Worker | Node auth token for registration | | SWARM_NODE_ID | Worker | Node identifier (default: hostname) | | SWARM_MAX_CONTAINERS | Worker | Max containers per node (default: 10) | | RESOLUTION | Docker | Screen resolution (default: 1920x1080) |

API

All REST endpoints require Authorization: Bearer <firebase-id-token> header.

| Method | Endpoint | Description | | -------- | ------------------------- | ----------------------------------- | | GET | /api/nodes | List all nodes | | GET | /api/nodes/:id | Get node with containers | | DELETE | /api/nodes/:id | Remove node (stops containers) | | POST | /api/containers | Create container on a node | | DELETE | /api/containers/:id | Stop and remove container | | POST | /api/sessions | Spawn terminal session in container | | DELETE | /api/sessions/:id | Kill session | | POST | /api/sessions/:id/input | Send input to session | | PATCH | /api/sessions/:id | Toggle interactive mode | | POST | /api/containers/:id/thumbnail | Upload VNC thumbnail (base64 JPEG) | | GET | /api/containers/:id/thumbnail | Get VNC thumbnail (supports ?token=) | | GET | /api/status | Server status |

Tech Stack

Manager: Express.js, React 19, Tailwind CSS 4, xterm.js, noVNC, better-sqlite3, Vite

Worker: Dockerode, node-pty, ws

Container: Ubuntu 24.04, TigerVNC, Fluxbox, noVNC, Google Chrome, s6-overlay v3