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

@repose-sh/sdk

v0.1.1

Published

TypeScript client for the Repose REST API. Dependency-free.

Readme

@repose-sh/sdk

TypeScript client for the Repose REST API. One file, no dependencies, global fetch.

Install

npm install @repose-sh/sdk

Node 20 or newer. ESM only. Published from packages/sdk in the Repose repo.

Getting a token

Settings → API tokens in the app. Tokens are workspace-scoped and look like rsk_…. A read token can list monitors and incidents. Creating, updating, deleting and acknowledging need a read-write token.

Usage

import { Repose, ReposeError } from "@repose-sh/sdk";

const repose = new Repose({ token: process.env.REPOSE_TOKEN! });

// what are we watching
const monitors = await repose.listMonitors();
for (const m of monitors) {
  console.log(`${m.name} — every ${m.intervalSeconds}s, ${m.consensusRequired} probes must agree`);
}

// add a check
const created = await repose.createMonitor({
  name: "checkout",
  kind: "http",
  url: "https://checkout.acme.com/health",
  intervalSeconds: 30,
  consensusRequired: 3,
});

// slow it down
await repose.updateMonitor(created.id, { intervalSeconds: 60 });

// who is on fire right now
const open = await repose.listIncidents({ status: "open" });
if (open[0]) await repose.acknowledgeIncident(open[0].id);

Errors that came from the API are ReposeError with the status and the API's own message — no wrapping, no re-phrasing:

try {
  await repose.deleteMonitor("mon_nope");
} catch (error) {
  if (error instanceof ReposeError) {
    console.error(error.status, error.message); // 404 monitor not found
  }
}

status is 0 when the request never reached the API at all (DNS, TLS, connection refused, wrong baseUrl).

Methods

| method | endpoint | token | | --- | --- | --- | | listMonitors() | GET /api/v1/monitors | read | | getMonitor(id) | — see below | read | | createMonitor(input) | POST /api/v1/monitors | write | | updateMonitor(id, patch) | PATCH /api/v1/monitors/:id | write | | deleteMonitor(id) | DELETE /api/v1/monitors/:id | write | | listIncidents(options?) | GET /api/v1/incidents | read | | acknowledgeIncident(id) | POST /api/v1/incidents/:id/acknowledge | write |

Two things the API can't do yet, and what we do instead

  • There is no GET /api/v1/monitors/:id. getMonitor(id) lists the workspace and filters client-side. It returns the right answer; it just costs a full list. If you need several, call listMonitors() once and index it yourself.
  • The incidents endpoint has no filters. It returns the 100 most recent incidents, newest first. listIncidents({ status: "open" }) filters those 100 after they arrive, so a workspace with more than 100 recent incidents can have older open ones this doesn't return.

Also worth knowing before you write a sync loop:

  • The monitor list doesn't return timeoutMs or expectedStatus, so you can't read back what you wrote for those two.
  • updateMonitor can't change a monitor's kind, url, host or port. Delete and recreate to move a target.
  • deleteMonitor is a soft delete. Checks stop; history stays.
  • Acknowledging an incident quiets the page. It does not resolve it — the probes decide when something is healthy again.

Options

new Repose({
  token: "rsk_…",
  baseUrl: "http://localhost:3000", // default https://repose.sh
  fetch: myFetch,                   // default globalThis.fetch
});