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

memscope

v0.1.5

Published

Real-time memory profiler for frontend and backend applications

Readme

MemScope

Real-time memory profiler for backend & frontend applications

MemScope helps developers visualize, understand, and debug memory usage in their projects with zero setup and a live dashboard.

It works locally, runs entirely on your machine, and supports:

  • Backend (Node.js)
  • Frontend (Browser JS heap – Chromium-based)
  • Full‑stack apps (backend + frontend together)

Why MemScope?

Memory bugs are hard:

  • Silent leaks
  • Unpredictable spikes
  • Heap snapshots that are painful to interpret
  • No unified view for backend + frontend

MemScope fixes that by giving you:

  • Live memory graphs
  • Clear spikes & GC behavior
  • Backend + frontend separation
  • One-command usage
  • No cloud, no accounts, no config

Installation & Usage

Option 1: One-time run (recommended)

npx memscope run node app.js

Option 2: Install globally

npm install -g memscope
memscope run node app.js

This automatically:

  • Starts the MemScope collector
  • Injects the memory agent
  • Opens a live dashboard
  • Streams memory data in real time

Tracking Modes

Backend only (default)

memscope run node app.js

Tracks:

  • Node.js heap
  • RSS / external memory
  • GC behavior

Frontend only (browser)

memscope run --frontend

Then inject the browser agent in development only.

React / Vite

if (import.meta.env.DEV) {
  import("memscope/agent/browser");
}

CRA / Webpack

if (process.env.NODE_ENV === "development") {
  require("memscope/agent/browser");
}

⚠️ Frontend tracking works best in Chrome / Edge. Safari does not expose JavaScript heap APIs.


Full‑stack (backend + frontend)

memscope run --both npm run dev

This gives you two live graphs:

  • Backend memory
  • Frontend browser memory

Perfect for:

  • SSR leaks
  • API + UI interactions
  • Long‑running sessions

Dashboard

Once running, open:

http://localhost:3333/dashboard/index.html

Dashboard

You’ll see:

  • Live memory timeline
  • Backend vs frontend separation
  • GC dips & spikes
  • Clear growth patterns

Example Use Cases

Debug a memory leak

memscope run node worker.js

Compare before/after refactor

memscope run node app.js
# refactor code
memscope run node app.js

SPA navigation leak

memscope run --frontend
npm run dev

How MemScope Works (Internals)

CLI
 ├─ starts collector (local)
 ├─ injects memory agent
 ├─ runs your app
 │
 ├─ agent samples memory
 ├─ collector aggregates data
 ├─ WebSocket streams live points
 └─ dashboard renders graphs

Everything runs locally.


Privacy & Security

  • No cloud
  • No uploads
  • No tracking
  • No external services

MemScope never sends your data anywhere.


Current Limitations

  • Frontend heap tracking requires Chromium
  • Port 3333 must be free
  • Node.js >= 16

Roadmap

  • Heap / RSS / External toggles
  • Memory spike annotations
  • Session comparison
  • Leak heuristics
  • Python & JVM agents

Author

Built with ❤️ for developers who care about performance.

Contributions welcome.