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/web

v0.3.1

Published

Web pages, values, feeds and live streams for sedge: tell me when this page or price changes, something new is posted, or a stream pushes a message.

Readme

@sedge-hq/web

The web for sedge, the always-on agent. Four signals:

  • web-page: a page whose text changes (a status page, release notes), with what was added; optionally only when it mentions something.
  • web-value: one value on a page or from an API (a price, a stock count, a status), or several named ones, reported when it changes; and the site going down and coming back.
  • feed: new posts on an RSS or Atom feed (a blog, releases, a forum).
  • stream: messages pushed over server-sent events or a WebSocket (ntfy, Gotify, Home Assistant, any live feed), each one an event.

In sedge, say "tell me when the Bun release notes change", "tell me when this kettle drops under £50", "tell me about new posts on this blog" or "wake me for urgent ntfy messages on my alerts topic".

web-page and feed

Both learn what's there first and report only what's new. Settings: url, and minutes between looks (default 15 for a page, 30 for a feed); web-page also takes contains, to stay quiet until the changed page mentions it. Details: url (and for a page, the lines removed).

web-value

It reads the page or API every minutes (default 10), learns the value on the first look, and reports each change with the value before and after.

  • select picks the value: a CSS selector on a page (.price, #stock, #stock li:nth-child(2)), with @attribute to read an attribute instead of the text (meta[itemprop="price"]@content); or a path into JSON (data.price, items[0].name, rates["EUR"]). Left out, it's the whole JSON answer, or the page's text.
  • fields reads several values at once, each as name = selector or path (price = .price, stock = .availability), and reports the ones that changed together.
  • method, body and headers make it an API call: a body is POSTed (JSON gets Content-Type: application/json), so a GraphQL query is {"query": "{ … }"}. Headers are Name: value.
  • token goes to your keychain and is sent as Authorization: Bearer <token>, or wherever {token} appears in the address, a header or the body instead (X-Api-Key: {token}).
  • account, instead of token: an account you signed in to with sedge, with any OAuth provider, your own included (see Signing in). Its current token is used the same way.
  • failures (default 3): after that many failed looks in a row (an error, a timeout, a selector that matches nothing) it reports the site down, once, and up when it answers again. 0 turns this off.

Text that is plainly a number is read as one: $1,299.00, 12,99 €, 1 299,50 and 45% become 1299, 12.99, 1299.5 and 45; 1.2k or 3 left stay text. So a condition like value < 500 works on a price.

Details: event (changed, down or up), url, value (the new value, or an object of the fields), previous, and for fields changed (their names); down has error and failures, up has downFor (minutes).

Pages are read as HTML, without running their scripts: a value a page only fills in with JavaScript isn't there to read. Its API usually is; point web-value at that instead.

stream

It connects to url and keeps the connection, reconnecting with backoff (1 second up to 5 minutes, or what the server asks) when it drops.

  • An https:// address must answer with text/event-stream (server-sent events). It sends Last-Event-ID when it reconnects, also after a restart, so a server that keeps events sends what was missed.
  • A ws:// or wss:// address is a WebSocket. send lists messages to send once connected, in order; {token} in them stands for the token.
  • headers and token work as for web-value.
  • skip drops messages whose SSE event, or JSON event or type, is one of these (default keepalive, ping, pong, heartbeat, open, auth_required, auth_ok).

Details: url, event (the SSE event's name, when it has one), id (the SSE id), and data (JSON as values, text otherwise), so data.priority >= 4 picks urgent ntfy messages.

  • ntfy: https://ntfy.sh/<topic>/sse.
  • Gotify: wss://<server>/stream?token={token}, with the client token as token.
  • Home Assistant: wss://<home>/api/websocket, a long-lived access token as token, and send {"type": "auth", "access_token": "{token}"} then {"id": 1, "type": "subscribe_events", "event_type": "state_changed"}. Add the condition data.type = event so only events wake sedge.

Signing in

Every signal here takes an optional account: the name of an account you signed in to in the browser, with any OAuth 2 provider, your own included (Accounts). Each request carries its current token as Authorization: Bearer <token> (or where {token} appears, for web-value and stream), and sedge renews it when it's due. Give a token or an account, not both. A 401 tells sedge the token was refused, so accounts can say to sign in again.

Channels and signals · MIT