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

@ereo/dev-inspector

v0.2.29

Published

Visual route inspector for EreoJS framework development

Readme

@ereo/dev-inspector

Visual route inspector and DevTools for EreoJS framework development. Provides comprehensive UI for exploring routes, data pipelines, islands, and cache during development.

Installation

bun add -D @ereo/dev-inspector

Quick Start

Route Inspector Only

import { createDevInspector } from '@ereo/dev-inspector';
import { defineConfig } from '@ereo/core';

export default defineConfig({
  plugins: [
    createDevInspector({
      mountPath: '/__ereo', // default
    }),
  ],
});

Visit http://localhost:3000/__ereo to open the route inspector.

Full DevTools Panel

import { createDevToolsPlugin } from '@ereo/dev-inspector';
import { defineConfig } from '@ereo/core';

export default defineConfig({
  plugins: [
    createDevToolsPlugin({
      mountPath: '/__devtools',
      dataPipeline: true,
      routes: true,
      islands: true,
      cache: true,
      position: 'bottom-right',
    }),
  ],
});

A floating button appears on your page. Click it to open the DevTools panel.

Features

Route Inspector

Visual interface for exploring routes at /__ereo:

  • Route paths with file locations
  • Render mode badges (SSR, SSG, CSR, API, RSC)
  • Feature tags (loader, action, islands count, auth)
  • Search filtering by path
  • Statistics cards (total, SSR, SSG, API counts)

DevTools Panel

Comprehensive development panel with five tabs:

  1. Data Pipeline - Loader timeline visualization with waterfall detection
  2. Routes - Route list with filtering by render mode
  3. Islands - Hydration status and strategy breakdown
  4. Cache - Cache entries, tags, TTL, and hit rates
  5. HMR - Hot Module Replacement event history

API Reference

createDevInspector(config?)

Creates the route inspector plugin.

interface InspectorConfig {
  /** Path to mount inspector (default: '/__ereo') */
  mountPath?: string;
  /** Enable route testing (reserved for future use) */
  enableTesting?: boolean;
  /** Show loader data (reserved for future use) */
  showLoaderData?: boolean;
}

Note: Currently only mountPath is functional. Other options are reserved for future implementation.

createDevToolsPlugin(config?)

Creates the full DevTools panel plugin.

interface DevToolsConfig {
  /** Mount path for DevTools panel (default: '/__devtools') */
  mountPath?: string;
  /** Enable data pipeline visualization (default: true) */
  dataPipeline?: boolean;
  /** Enable routes visualization (default: true) */
  routes?: boolean;
  /** Enable islands visualization (default: true) */
  islands?: boolean;
  /** Enable cache visualization (default: true) */
  cache?: boolean;
  /** Position of overlay button (default: 'bottom-right') */
  position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
}

Utility Functions

// Generate inspector HTML from route info
generateInspectorHTML(routes: RouteInfo[]): string

// Convert framework routes to RouteInfo format
createRouteInfo(routes: Route[]): RouteInfo[]

// Format routes as CLI tree output
formatRouteTree(routes: RouteInfo[]): string

// DevTools HTML generators
generateDevToolsPanelHTML(data: DevToolsPanelData): string
generateDataPipelineHTML(data: DataPipelineVisualization): string
generateRoutesTabHTML(routes: RouteVisualization[]): string
generateIslandsTabHTML(islands: IslandVisualization[]): string
generateCacheTabHTML(cache: CacheVisualization): string

Type Exports

export type {
  InspectorConfig,
  RouteInfo,
  DevToolsConfig,
  DataPipelineVisualization,
  IslandVisualization,
  CacheVisualization,
  HMREvent,
  LoaderTiming,
  CacheEntry,
} from '@ereo/dev-inspector';

CLI Output Example

import { createRouteInfo, formatRouteTree } from '@ereo/dev-inspector';

const routes = router.getRoutes();
const info = createRouteInfo(routes);
console.log(formatRouteTree(info));

// Output:
// Route Tree:
//
//   ⚡ / [loader]
//      → src/routes/index.tsx
//   📄 /about
//      → src/routes/about.ssg.tsx
//   🔌 /api/posts [loader, action]
//      → src/routes/api/posts.api.ts

Render mode icons:

  • ⚡ SSR (Server-Side Rendering)
  • 📄 SSG (Static Site Generation)
  • 💻 CSR (Client-Side Rendering)
  • 🔌 API
  • 🚀 RSC (React Server Components)
  • • Unknown/Custom

Production Usage

Exclude DevTools from production builds:

const plugins = [];

if (process.env.NODE_ENV === 'development') {
  const { createDevToolsPlugin } = await import('@ereo/dev-inspector');
  plugins.push(createDevToolsPlugin());
}

const app = createApp({ plugins });

API Endpoints

The DevTools plugin exposes the following HTTP endpoints:

| Endpoint | Method | Description | |----------|--------|-------------| | /__devtools | GET | DevTools panel HTML | | /__devtools/api/routes | GET | JSON array of route data | | /__devtools/api/pipeline | GET | JSON array of pipeline metrics history | | /__devtools/api/hmr | GET | JSON array of HMR events | | /__devtools/api/pipeline/record | POST | Record custom pipeline metrics |

The Route Inspector exposes:

| Endpoint | Method | Description | |----------|--------|-------------| | /__ereo | GET | Route inspector HTML | | /__ereo/api/routes | GET | JSON array of routes |

Documentation

For full documentation, visit https://ereojs.github.io/ereoJS/api/dev-inspector/

Part of EreoJS

This package is part of the EreoJS monorepo.

License

MIT