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

@telerithm/sdk

v0.1.0

Published

Telerithm client SDK for JavaScript / TypeScript — ship structured logs, errors, and breadcrumbs to a Telerithm backend.

Readme

@telerithm/sdk

Client SDK for Telerithm — ship structured logs, errors, and breadcrumbs from JavaScript / TypeScript apps to a Telerithm backend.

Install

npm install @telerithm/sdk

Node.js ≥ 18. Works in Node, modern browsers, and edge runtimes that support fetch.

Quick start

import { init, log, captureError, setUser } from "@telerithm/sdk";

init({
  dsn: "https://<api-key>@logs.example.com/<source-id>",
  service: "my-app",
  release: "1.4.2",
  environment: "production",
});

log("info", "user signed in", { userId: "u_123" });

setUser({ id: "u_123", email: "[email protected]" });

try {
  // ...
} catch (err) {
  captureError(err as Error, { route: "/checkout" });
}

The default client batches logs in memory and flushes them to the configured ingest endpoint at flushIntervalMs or when batchSize is reached. process.exit and beforeunload are handled for you when autoCapture is enabled (default).

Configuration

You can configure either via a DSN or via direct fields:

init({ dsn: "https://<key>@logs.example.com/<sourceId>" });

// or

init({
  endpoint: "https://logs.example.com/api/v1/ingest/<sourceId>",
  apiKey: "<key>",
});

Options

| Option | Default | Description | | ----------------- | ------- | ------------------------------------------------------------ | | dsn | — | DSN string (https://<key>@<host>/<sourceId>) | | endpoint | — | Direct ingest URL (alternative to dsn) | | apiKey | — | API key (alternative to dsn) | | service | — | Service name attached to every event | | release | — | Release / version tag | | environment | — | production / staging / etc. | | autoCapture | true | Install uncaughtException / unhandledRejection handlers | | breadcrumbs | true | Capture breadcrumbs (console + fetch + manual) | | maxBreadcrumbs | 100 | Cap on retained breadcrumbs per event | | batchSize | 50 | Flush after this many queued logs | | flushIntervalMs | 5000 | Periodic flush interval | | timeout | 5000 | HTTP timeout per flush |

API

init(options): TelerithmClient    // create + register the global client
getClient(): TelerithmClient | null

log(level, message, extra?)
captureError(error, extra?)

setUser(user)
setTag(key, value)

flush(): Promise<void>             // force a flush
close(): Promise<void>             // flush + tear down (call on shutdown)

For multi-client setups (e.g. tests, multiple sinks), import TelerithmClient directly and skip init:

import { TelerithmClient } from "@telerithm/sdk";

const client = new TelerithmClient({ ... });
client.log("info", "...");
await client.close();

Versioning

Pre-1.0: the API and on-the-wire payload may change between minor versions. From 1.0 onwards the SDK adheres to SemVer.

See CHANGELOG.md for per-release notes.

License

MIT — see LICENSE.