Raycast extension is now available

See every route in your Next.js app.

next-lens scans your App Router project and maps every page and API route — in the terminal, a local inspector, your AI editor, or Raycast. No dev server required.

Get started
next-lens inspector listing API routes

Features

Your route map, without the guesswork.

next-lens reads the App Router conventions so you don't have to click through folders to understand how your app is wired.

API routes

Every route.ts in app/api, with its exported HTTP handlers detected — GET, POST, PUT, PATCH, DELETE and more.

Page routes

Every page with its loading and error boundaries marked as co-located, inherited, or missing.

Dynamic segments

Dynamic, catch-all and optional catch-all params are highlighted so route shapes read at a glance.

Stack snapshot

Next.js, React and Node versions plus the package manager, reported in a single command.

Zero runtime

Pure static analysis of your file tree. No dev server, no build step, no config file.

Any directory

Point it at any path. Ideal for monorepos with several Next.js apps side by side.

Interfaces

One scan. Four ways to explore.

Use whichever fits the moment — the same route data powers every surface.

Answers right in your terminal

Colorized tables for pages and API routes, ready the moment you hit enter.

  • page:list with loading / error coverage
  • api:list with --method filtering
  • info for a framework and runtime snapshot
Read the CLI docs
~/my-app
$ npx next-lens api:list
Next.js API Route Info
Mapped 5 routes
+==================+====================+===================================+
| METHOD | ROUTE | SOURCE |
+------------------+--------------------+-----------------------------------+
| POST | /api/auth/login | app/api/auth/login/route.ts |
| GET|POST | /api/posts | app/api/posts/route.ts |
| GET|PATCH|DELETE | /api/posts/:postId | app/api/posts/[postId]/route.ts |
| GET | /api/files/:parts* | app/api/files/[...parts]/route.ts |
| GET | /api/search | app/api/search/route.ts |
+==================+====================+===================================+

How it works

From folder tree to route map in seconds.

  1. 01

    Run one command

    Run next-lens in your project root, or pass any directory — handy for monorepos.

  2. 02

    Scan the app directory

    next-lens walks app/, follows the App Router conventions and reads exported handlers. Nothing is executed.

  3. 03

    Explore your routes

    Browse, search and jump to source from the interface you already have open.

next-lens
app
api
blogs
[blogId]
route.ts
login
route.ts
users
route.ts
Next.js 16.0.10Waiting...

Map your routes in seconds.

Free and open source. Run it once — no install, no config.