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

@devalade/route-list

v0.1.2

Published

A command-line tool to scan and list all routes in your Next.js application, supporting both the App Router and Pages Router patterns.

Readme

Next.js Route List

A command-line tool to scan and list all routes in your Next.js application, supporting both the App Router and Pages Router patterns.

Features

  • ✅ Supports Next.js App Router (app directory)
  • ✅ Supports Next.js Pages Router (pages directory)
  • ✅ Handles projects with src directory structure
  • ✅ Supports TypeScript (.tsx) and JavaScript (.js) files
  • ✅ Handles route groups (...) in App Router
  • ✅ Clean and formatted output

Installation

Install globally using your preferred package manager:

npm install -g @devalade/route-list
# or
yarn global add @devalade/route-list
# or
pnpm add -g @devalade/route-list

Usage

Navigate to your Next.js project directory and run:

route-list

That's it! The tool will automatically scan your project and list all available routes.

Example Output

Scanning Next.js routes...

Found App Router directory...
Found Pages Router directory...

Found routes:
- /
- /about
- /blog
- /blog/[slug]
- /contact
- /products/[category]/[id]

Total routes found: 6

Supported Project Structures

The tool works with various Next.js project structures:

Standard Structure

my-next-app/
├── app/                  # App Router
│   ├── page.tsx
│   └── about/
│       └── page.tsx
└── pages/               # Pages Router
    ├── index.tsx
    └── blog/
        └── index.tsx

Src Directory Structure

my-next-app/
└── src/
    ├── app/            # App Router
    │   ├── page.tsx
    │   └── about/
    │       └── page.tsx
    └── pages/         # Pages Router
        ├── index.tsx
        └── blog/
            └── index.tsx

Route Detection Rules

App Router (app directory)

  • Detects routes from files named page.js or page.tsx
  • Handles route groups (folders starting with parentheses)
  • Ignores files that aren't pages (like layout.tsx, loading.tsx)

Pages Router (pages directory)

  • Detects routes from .js and .tsx files
  • Converts index files to root routes
  • Maintains folder structure in route paths

Troubleshooting

If you encounter any issues:

  1. Ensure you're in a Next.js project directory
  2. Verify that you have either an app or pages directory (or both)
  3. Check if your project uses a src directory structure
  4. Make sure you have read permissions for the project directory

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Devalade

Notes

  • The tool ignores node_modules and hidden folders (starting with '.')
  • Route paths are normalized to ensure consistent formatting
  • Both App Router and Pages Router can coexist in the same project