🚨 Active Supply Chain Attack:node-ipc Package Compromised.Learn More
Socket
Book a DemoSign in
Socket

next-lens

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

next-lens

A CLI companion for Next.js App Router developers that scans API routes and provides quick insights from the terminal

latest
Source
npmnpm
Version
1.2.0
Version published
Maintainers
1
Created
Source
next-lens-inspector

next-lens

next-lens is a light CLI companion for the Next.js App Router. Scan any project and see API and page routes instantly in your terminal.

What it does

  • Lists app/**/page.* and shows whether loading / error is colocated or inherited.
  • Scans app/api/**/route.* with colorized HTTP methods.
  • Highlights dynamic, optional, and catch-all params so route shapes are obvious.
  • Reports Next.js / React / Node versions and the package manager.
  • Works on any target directory—no Next.js runtime needed.

Quick start

Run in a Next.js project root, or pass another directory:

npx next-lens@latest [command] [target-directory]

Commands

[dir] arguments are optional, they default to the current directory.

  • next-lens about — one-page tool overview.
  • next-lens api:list [dir] [-m, --method] — list API routes and detected HTTP handlers.
  • next-lens page:list [dir] — list page routes and show loading / error coverage.
  • next-lens info [dir] — show Next.js / React / Node / package manager versions.
  • next-lens web [dir] — launch the inspector UI.
  • next-lens web:build [dir] — build a static readonly snapshot of the inspector.

MCP integration

Expose the same insights to IDEs or copilots via MCP:

{
  "mcpServers": {
    "next-lens": {
      "command": "npx",
      "args": ["next-lens@latest", "mcp"]
    }
  }
}

License

MIT © Yiwei Ho

Keywords

next

FAQs

Package last updated on 28 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts