opensourceprojects.dev

A broadsheet for software that doesn't ask for your email

Visualize your node_modules and inspect duplicate packages and install sizes
GitHub RepoViews0

Project Description

View on GitHub

Finally Understand What's Actually Inside Your node_modules

You've probably had this moment: you open node_modules, scroll through a few thousand folders, and wonder what's actually taking up all that space. Or you notice the same package name showing up with three different version numbers and have no idea why. Node Modules Inspector is a tool that makes all of that visible—your dependencies, their sizes, and the duplicates hiding in the tree.

What It Does

Node Modules Inspector is a visualization and inspection tool for your node_modules directory. You run it inside an existing project, and it gives you a web interface for exploring your dependency tree. The README notes it currently supports pnpm, npm, and bun projects, with an open invitation for the community to add other package managers.

Beyond the interactive UI, the project offers a few other ways to get at the same data. There's a static build command that generates a single-page app of your current node_modules state, which you can host on any static file server. There's also a set of CLI reports—duplicates, sizes, and maintainers—that print tables to your terminal or emit JSON when you pass --json. And for those wiring things into AI coding agents, the same three reports are exposed as MCP tools over stdio. The online version at node-modules.dev runs on WebContainer if you want to poke around without installing anything.

Why It's Cool

The CLI reports are genuinely useful outside the browser. The web UI is the headline feature, but the report commands are where this gets practical for automation. report duplicates finds packages installed in multiple versions. report sizes sorts packages by install size. report maintainers surfaces dependency-upgrade opportunities and publint results grouped by consumer or author. Each one supports --json, and progress logs go to stderr so your pipes stay clean—you can pipe straight into jq without surprises.

The MCP server is a smart bet on where tooling is heading. Rather than building a bespoke integration for every AI coding assistant, the project exposes the same three reports as MCP tools (nmi:report-duplicates, nmi:report-sizes, nmi:report-maintainers) with schemas auto-derived from valibot definitions. You add node-modules-inspector mcp as a stdio server in your MCP config and you're done. There's even an agent skill bundled in the package, and if your project uses skills-npm, it gets symlinked into your agent's skill directory automatically after install.

Configuration is opt-in and unobtrusive. Drop a node-modules-inspector.config.ts in your project root and you can set default filters (like excluding eslint from the view), toggle settings like moduleTypeSimple, or enable the experimental publint.dev integration. If you don't create the file, the defaults just work.

The static build is a nice touch for sharing. Being able to snapshot your node_modules state into a hostable SPA means you can share a dependency audit with your team without them running anything locally. The README points to everything.antfu.dev as an example—a build covering all of Anthony Fu's packages.

How to Try It

The fastest path is to run it directly in your project (no install needed):

pnpx node-modules-inspector

Or with npm or bun:

npx node-modules-inspector
bunx node-modules-inspector

If you'd rather not touch your local setup at all, the online version at node-modules.dev lets you try it in the browser via WebContainer.

To generate a static build you can host anywhere:

npx node-modules-inspector build

That produces a .node-modules-inspector folder—serve it with any static file server.

For the CLI reports:

npx node-modules-inspector report duplicates
npx node-modules-inspector report sizes --json --limit 10
npx node-modules-inspector report maintainers --json --sort migration --no-latest-only

And to wire up the MCP server for an AI agent:

npx node-modules-inspector mcp

Full details, configuration options, and screenshots are in the repository.

Final Thoughts

This is a focused tool that does one thing well: it makes the opaque mess inside node_modules legible. The web UI is the approachable entry point, but the CLI reports and MCP integration are what make it worth keeping around—especially if you're already using AI coding agents or want dependency audits you can script. It's best suited to developers maintaining projects with real dependency trees (which is most of us), and the multi-package-manager support covers the common cases. If you've ever stared at a bloated node_modules and wondered where to start trimming, this is a reasonable place to begin.


Follow @githubprojects for more developer tools and open source projects.

Back to Projects
Project ID: node-modules-inspectorLast updated: November 27, 2026 at 02:47 AM