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

@anura-gate/watcher-github

v0.2.0

Published

GATE Watcher — Self-hosted GitHub event monitor. Token never leaves your machine.

Readme

GATE Watcher — GitHub

Self-hosted daemon that monitors your GitHub notifications and repository events, pushing them to GATE cloud for security processing. Your GitHub token never leaves your machine.

How it works

Your Machine (Watcher)              GATE Cloud
┌─────────────────────┐        ┌──────────────────┐
│ GitHub API polling   │───────>│ Security pipeline │
│ (token stays HERE)   │<───────│ (redact, policy,  │
│                      │ poll   │  audit, forward)  │
└─────────────────────┘        └──────────────────┘

Quick Start (CLI)

cd gate-watcher-github
npm install

# Create .env (or pass env vars directly)
cp .env.example .env
# Fill in GATE_KEY, GATE_INTEGRATION_ID, GITHUB_TOKEN

npm start

Embed in Your App (SDK)

npm install @anura-gate/watcher-github
const { GateGitHubWatcher } = require("@anura-gate/watcher-github");

const watcher = new GateGitHubWatcher({
  gateKey: "gk-xxx",
  integrationId: "int_xxx",
  githubToken: "ghp_xxx",
  repos: ["owner/repo1", "owner/repo2"], // optional — omit to watch all notifications
});

watcher.on("ready", (username) => {
  console.log(`GitHub connected: ${username}`);
});

// Every GitHub event after GATE security processing
watcher.on("event", (event, result) => {
  console.log(`Event: ${event.eventType}, Repo: ${event.repo}`);
  console.log(`Security actions: ${result.securityActions}`);
});

watcher.on("action_result", ({ action, success, error }) => {
  console.log(`${action}: ${success ? "done" : error}`);
});

await watcher.start();

// Later...
await watcher.stop();

SDK Events

| Event | Args | Description | |---|---|---| | ready | (username) | Connected to GitHub | | event | (event, result) | GitHub event processed by GATE | | action | (action) | Outbound action received from GATE queue | | action_result | ({ actionId, action, success, result, error }) | Outbound action completed | | gate_error | ({ path, status, error }) | GATE API call failed | | github_error | ({ path, error }) | GitHub API call failed | | limit_reached | (type) | Plan limit hit | | stopped | — | Watcher fully shut down |

SDK Options

| Option | Required | Default | Description | |---|---|---|---| | gateKey | Yes | — | Virtual key (gk-xxx) | | integrationId | Yes | — | Integration ID (int_xxx) | | githubToken | Yes | — | GitHub Personal Access Token (ghp_...) | | gateUrl | No | "https://anuragate.com" | GATE cloud URL | | repos | No | [] | Array of "owner/repo" to watch. Empty = all notifications | | pollInterval | No | 60000 | ms between GitHub API polls | | heartbeatInterval | No | 30000 | ms between heartbeats | | sessionId | No | — | Session ID for multi-tenant use | | sessionLabel | No | — | Human-readable session label | | sessionMetadata | No | {} | Arbitrary metadata for the session |

Setup

  1. Go to github.com/settings/tokens and create a Personal Access Token
  2. Required scopes: repo, notifications
  3. Go to GATE Dashboard → Integrations → Add Integration
  4. Select GitHub, copy the Integration ID
  5. Copy your Virtual Key from the Keys page
  6. Set the env vars and run

Environment Variables

| Variable | Required | Description | |---|---|---| | GATE_KEY | Yes | Your GATE virtual key | | GATE_INTEGRATION_ID | Yes | Integration ID from the dashboard | | GITHUB_TOKEN | Yes | Personal Access Token (ghp_...) | | GITHUB_REPOS | No | Comma-separated repos to watch: owner/repo1,owner/repo2 | | GATE_URL | No | Custom GATE cloud URL | | WEB_PORT | No | Port for the dev dashboard (CLI only) |

Security model

  • GitHub token stored in .env on YOUR machine
  • GATE cloud never sees or stores your credentials
  • All event content passes through GATE's security pipeline
  • Billing, limits, and security enforced server-side