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

express-terminal-monitor

v1.0.0

Published

Zero-dependency local development API latency and resource profiler middleware for Express.js. Renders a live, flicker-free terminal dashboard (TUI).

Readme

🚀 express-terminal-monitor

NPM Version Downloads Build Status License GitHub Stars

Zero-dependency, local development API latency and resource profiler middleware for Express.js. Renders a live, flicker-free terminal dashboard (TUI).

express-terminal-monitor is an ultra-lightweight, zero-overhead developer utility that transforms your terminal console into a live dashboard. As requests hit your local Express server, it measures route-by-route execution speed, logs HTTP response status codes, and displays real-time system CPU & memory consumption.

┌──────────────────────────────────────────────────────────┐
│  🚀 EXPRESS API TERMINAL MONITOR                         │
├──────────────────────────────────────────────────────────┤
│  SYSTEM UTILIZATION                                      │
│  CPU Usage  : [████░░░░░░░░░░░░░░░░] 20.0%               │
│  Heap Memory: [██████░░░░░░░░░░░░░░] 150.0 MB / 512 MB   │
│  Total HTTP Requests Processed: 142                      │
├──────────────────────────────────────────────────────────┤
│  ACTIVE ROUTE LATENCIES (Last 100 requests)              │
│  METHOD   ROUTE                      HITS    AVG  MIN/MAX│
│  GET      /api/users/:id             52      12ms 5/45ms │
│  POST     /api/login                 45      48ms 8/92ms │
├──────────────────────────────────────────────────────────┤
│  RESPONSE STATUS DISTRIBUTION                            │
│  2xx Success: [████████████████████] 88.0% (125)          │
│  3xx Redirect: [██░░░░░░░░░░░░░░░░░░] 8.0% (11)           │
│  4xx Client  : [█░░░░░░░░░░░░░░░░░░░] 4.0% (6)            │
│  5xx Server  : [░░░░░░░░░░░░░░░░░░░░] 0.0% (0)            │
└──────────────────────────────────────────────────────────┘

Key Features

  • ⚡ Flicker-Free Terminal UI (TUI): Repositions the cursor dynamically using ANSI escape sequences (\x1b[N A) on updates instead of clearing the screen, ensuring smooth, non-flickering redraws.
  • 🛣️ Express Route Aggregation: Groups metrics by dynamic Express routes (e.g. /api/users/:id) rather than raw request URLs (e.g. /api/users/123), preventing route list explosion.
  • 🛡️ Production Auto-Bypass: Instantly disables console dashboard rendering in production environments (process.env.NODE_ENV === 'production') to maintain standard clean logs.
  • 📦 Zero Runtime Dependencies: Pure JS/TS implementation with 0 third-party packages, keeping your application package lightweight and secure.
  • ⚙️ Core Telemetry & Profiling: Tracks CPU load, memory utilization (V8 heap allocation), route counts, response codes (2xx/3xx/4xx/5xx), and millisecond precision latencies.

Installation

Install via your preferred package manager:

npm install express-terminal-monitor
# or
yarn add express-terminal-monitor
# or
pnpm add express-terminal-monitor
# or
bun add express-terminal-monitor

Quick Start

Just import and register the middleware in your Express application:

import express from 'express';
import { expressTerminalMonitor } from 'express-terminal-monitor';

const app = express();

// Register the terminal monitor middleware
app.use(expressTerminalMonitor());

app.get('/api/users/:id', (req, res) => {
  res.send({ id: req.params.id, name: 'John Doe' });
});

app.listen(3000, () => {
  console.log('Server started on port 3000');
});

Options

Customize the monitor behavior by passing configuration parameters:

app.use(expressTerminalMonitor({
  /**
   * Refreshes the terminal dashboard every 300ms.
   * Default: 500ms
   */
  intervalMs: 300,

  /**
   * Manually enable or disable the terminal rendering.
   * Default: true (automatically disabled if NODE_ENV === 'production')
   */
  enabled: true
}));

Contributing

We welcome community contributions! Please read our Contributing Guide to set up the development environment, build the TypeScript files, and run tests.


License

MIT © Ezekiel Adejobi