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

@cisstech/node-lens-server

v0.1.1

Published

The core of NodeLens: it bridges OpenTelemetry to the dashboard and hosts the plugin system. Your app never imports this at runtime; the [`nls` CLI](../cli) loads it. You import it to **write a plugin** or to configure a session in `nodelens.config.js`.

Downloads

35

Readme

@cisstech/node-lens-server

The core of NodeLens: it bridges OpenTelemetry to the dashboard and hosts the plugin system. Your app never imports this at runtime; the nls CLI loads it. You import it to write a plugin or to configure a session in nodelens.config.js.

New here? Start with the root README for install and quick start, and the plugin authoring guide to build a plugin. This page documents the server's own API.

createNodeLens(options)

nodelens.config.js exports one call to createNodeLens. It wires the event bus, the event store, the SSE channel, and your plugins, then waits for the CLI to hand it the running app.

const { createNodeLens } = require('@cisstech/node-lens-server')
const { RequestPlugin } = require('@cisstech/node-lens-request')

module.exports = createNodeLens({
  plugins: [new RequestPlugin({ captureBody: true })],
})

| Option | Default | Purpose | |--------|---------|---------| | plugins | [] | The plugin instances to run. | | baseUrl | /node-lens/ | URL prefix the dashboard and APIs are mounted under. | | hostname | app's origin | Override the host used to build dashboard URLs. | | eventStore | { backend: 'file', path: './.node-lens/events' } | Where captured events are buffered. | | metricCollectionInterval | 60000 | Metric export interval, in ms. |

How data flows

your app → OpenTelemetry SDK → NodeLens exporters → EventBus
                                                       ├─ plugins transform & re-emit
                                                       └─ SseManager → dashboard (live)
                                                          + FileEventStore (history / MCP)

The CLI installs the OTel SDK with the NodeLens exporters and each plugin's instrumentations(), then calls nodeLens.listen(app) once the app is listening. Each monitoring run is a fresh session (the store resets on boot), and every SSE/command/history request is authenticated with a per-session token.

What it exports for plugin authors

  • NodeLensPlugin: the interface your plugin class implements.
  • EventBus, and the OTel event constants OTEL_TRACE_EVENT, OTEL_LOG_EVENT, OTEL_METRIC_EVENT, plus the TraceData / LogData / MetricData shapes.
  • BaseCommandHandler, CommandChain: for handleCommand implementations.
  • EventStore, SSEEvent, HistoryQuery, HistoryResult, FilterExpr: the event-store types the client reads through.
  • AppInfo: framework/port info passed to onListen and isAvailable.

See the authoring guide for how these fit together.

Develop

npx nx build node-lens-server
npx nx test node-lens-server