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

@sedge-hq/local

v0.3.2

Published

Webhooks, files, commands, syslog, presence and this machine for sedge: wake it when something posts to it, a folder changes, a command prints something new, a device logs or joins the network, or the battery runs low.

Readme

@sedge-hq/local

What happens on your machine and your network, for sedge, the always-on agent. Six signals:

  • webhook: each HTTP POST to a local address (default http://127.0.0.1:4747) is an event. Senders give the token you chose, as Authorization: Bearer <token>, ?token=<token>, or a GitHub webhook secret. A deploy hook, a home sensor, a form, any service that sends webhooks.
  • files: files created, changed or removed in a folder (or one file), optionally only those matching a glob like **/*.csv.
  • command: a shell command. A long-running one (tail -n0 -f app.log, mosquitto_sub -t sensors/#) reports each burst of lines it prints; with minutes, it runs on a schedule and reports when its output changes.
  • syslog: syslog messages from a NAS, a router, a firewall or a server, over UDP and TCP.
  • presence: a device (a phone, a laptop) joining or leaving the local network.
  • system: this machine: unplugged or plugged in, the battery low, a disk nearly full, waking from sleep, and optionally the screen locking.

In sedge, say "tell me when a CSV lands in ~/Downloads/reports", "wake me when the deploy webhook fires and the site is down", "tell me when the NAS logs an error", "when Ada's phone comes home, remind me about the parcel" or "tell me when the disk is nearly full".

A webhook's details are its path and body (JSON as values), so a condition like body.status = failed can pick the deliveries that matter.

files

It looks every seconds (default 10). A new or changed file is reported once it has held still for settle seconds (default 2: the same size and time of change), so one save or one download is one event, and what changed alongside it comes in the same event. A file that never holds still, like a busy log, is reported anyway after a minute. settle: 0 reports what it sees at once.

It leaves out node_modules, .git, .DS_Store, editors' swap and backup files (*.swp, *.swx, *~, .#*), and temporary and unfinished downloads (*.tmp, *.part, *.crdownload, *.download, .~lock.*). Set skip to your own list instead: a name or glob is matched against each file's and folder's name, a pattern with a / against its path in the folder (build/**); an empty list leaves nothing out.

syslog

It listens on 127.0.0.1:5514, UDP and TCP (newline-separated or octet-counted), and reads RFC 5424 and the older BSD form (RFC 3164) that most routers and NASes send. Set port, and host to 0.0.0.0 (or this machine's address) to hear devices on your network; then point the device's remote syslog at this machine and port. Port 514 needs root, so most devices let you change it.

Details: severity (emergency, alert, critical, error, warning, notice, info, debug), level (0 to 7, the same as a number), facility, host (what the device calls itself, or its address), app, pid, time, message, and from (the address it came from). level <= 4 keeps warnings and worse.

presence

Every seconds (default 60) it pings the device and reads this machine's neighbour (ARP) table.

  • device is its address (192.168.1.20) or name (pixel.local); mac is its hardware address, found in the ARP table, so it's known when its address changes. Give both where you can. With only a MAC, this machine has to have talked to the device lately.
  • It says when the device joins at once, and that it left only after away minutes without an answer (default 5): phones sleep their Wi-Fi.
  • On Linux a device that answers ARP but not ping counts as here; on macOS and Windows it has to answer ping, and the ARP table only finds its address. Phones that hide behind a private (randomised) MAC keep the same one per network, so set it once from the phone's Wi-Fi details.

Details: event (joined or left), present (true or false), device, name, ip, mac, and lastSeen when it left.

system

Every seconds (default 60) it reads the battery and the disks, and reports changes only:

  • unplugged or plugged in (power: false to stop), and the battery at or below battery percent while unplugged (default 20; 0 never);
  • a disk at or above disk percent full (default 90; 0 never), for the disks holding paths (default your home folder);
  • waking from sleep (sleep: false to stop): a look that comes much later than planned means the machine slept;
  • with lock: true, the screen locking and unlocking (macOS, Linux with systemd-logind, Windows).

It reads pmset on macOS, /sys/class/power_supply on Linux and Win32_Battery through PowerShell on Windows. Details: event (on-battery, on-power, battery-low, disk-full, woke, locked, unlocked), with battery and onPower; path, used (percent) and free (GB) for a disk; slept (minutes) and since for waking.

Safety

The command runs in your shell with your rights, and the webhook and syslog listen only on this machine unless you set host. With sedge's sandbox on, the agent's own commands are confined; the command signal's command is yours, and runs as you wrote it.

Channels and signals · MIT