DEV Community

Deepak Ashok Karai
Deepak Ashok Karai

Posted on

API Route Lister - The Ultimate CLI Tool for Discovering API Routes

Ever wondered how many API endpoints your application has? I built a CLI tool that scans your source code and lists all your routes - with code preview, search, and filtering!

šŸš€ What is API Route Lister?

API Route Lister is a command-line tool that automatically scans your codebase and discovers all API endpoints. It supports multiple frameworks including Express, Fastify, Next.js, Hapi, and Koa.

Key Features

  • šŸ” Auto-Detection - Automatically detects your framework
  • šŸ’» Code Preview - View endpoint code directly in CLI
  • šŸŽ® Interactive Mode - Browse with keyboard navigation
  • šŸ”Ž Search & Filter - Find routes by path or HTTP method
  • šŸ“Š Multiple Views - Table, List, or Tree format
  • šŸ“¤ Export - JSON and Markdown output

šŸ“¦ Installation

npm install -g api-route-lister
Enter fullscreen mode Exit fullscreen mode

šŸš€ Quick Start

api-route-lister ./src
api-route-lister ./src -i
api-route-lister ./src -o tree -c
Enter fullscreen mode Exit fullscreen mode

šŸŽ® Interactive Mode Controls

[j] Next  [k] Prev  [v] View Code  [g] Go To  [/] Search  [f] Filter  [r] Reset  [q] Quit
Enter fullscreen mode Exit fullscreen mode

Quick Commands

  • g 50 - Go to route #50
  • / users - Search for users
  • f GET - Filter GET routes only
  • v - View selected route code

šŸ“‹ Options

Option Description
-f, --framework Framework (auto, express, fastify, nextjs, hapi, koa)
-o, --output Output format (table, list, tree)
-c, --code Show endpoint code
-i, --interactive Interactive TUI mode
--json Output as JSON
-m, --markdown Output as Markdown

Get It Now

npm install -g api-route-lister
Enter fullscreen mode Exit fullscreen mode

npm | GitHub


Built with ā¤ļø by Deepak Ashok Karai

Top comments (0)