RouteCheck 0.2.2

dotnet tool install --global RouteCheck --version 0.2.2
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local RouteCheck --version 0.2.2
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=RouteCheck&version=0.2.2
                    
nuke :add-package RouteCheck --version 0.2.2
                    

RouteCheck-Logo

RouteCheck

NuGet Package License

Check your API routes in your Terminal.


RouteCheck is a dotnet tool for checking/viewing the routes of your ASP.NET Core app in your terminal, like php artisan route:list or mix phx.routes. The check command (default) shows you all routes in a nice table: minimal APIs, controllers, Razor Pages and everything else that is mapped as an endpoint, together with the handler of each route.

RouteCheck works with ASP.NET Core apps on .NET 8 or later. No OpenAPI package or other changes to your app are needed.

Installation

You can install RouteCheck as a dotnet tool via NuGet:

# Install
dotnet tool install --global RouteCheck

# Update
dotnet tool update --global RouteCheck

Usage

In your terminal cd into a ASP.NET project and run:

routecheck

This should give you something like this:

Method Path                     Handler
ANY    /                        Page /Index
GET    /api/orders              OrdersController.List
GET    /api/orders/{id:int}     OrdersController.Get
PUT    /api/orders/{id:int}     OrdersController.Update
GET    /health                  Health.Check
ANY    /Orders/Details/{id:int} Page /Orders/Details
GET    /pets                    Program (lambda)
  • ANY means the route accepts every HTTP method, like Razor Pages do.
  • For minimal APIs, the handler is the method passed to MapGet etc. A lambda is shown as (lambda) with the class it is declared in.
  • Controllers with conventional routes (MapControllerRoute) are shown with one row per action and their controller and action filled in, e.g. /Home/About/{id?}. Shorter URLs from route defaults, like / for HomeController.Index, are not listed separately.

You can also provide a path to the web app's directory or project file via the path option:

routecheck --path /absolute/path/to/webapp

# or

routecheck -p relative/path/to/webapp/WebApp.csproj

RouteCheck waits 20 seconds for your app to start (after building it). If your app needs longer, e.g. because it runs migrations on startup, set the timeout option:

routecheck --timeout 60

If your app targets multiple frameworks, choose the one to build and run with the framework option:

routecheck --framework net9.0

Filter routes

The routes are sorted by path, and routes with the same path by method. To show only routes with certain HTTP methods, use the method option. It can be used multiple times or with comma-separated values:

routecheck --method GET -m post

# or

routecheck -m get,post

To show only routes whose path contains a text, use the filter option. With a wildcard (* or %), the pattern has to match the whole path. It can be used multiple times, a route has to match one of them:

# /pets, /pets/{id}, /users/{id}/pets, ...
routecheck --filter pets

# /pets, /pets/{id}, but not /users/{id}/pets
routecheck -f "/pets*"

Matching is case-insensitive, like ASP.NET Core routing. method and filter can be combined. Routes accepting any method (ANY) are shown for every method.

Output for scripts and LLM agents

With --output json or --output markdown, RouteCheck prints only the result, as one document: no status lines and no update notice.

routecheck --output json
{
  "command": "check",
  "project": "src/Api/Api.csproj",
  "routes": [
    {
      "method": "GET",
      "path": "/pets",
      "handler": "PetsController.List"
    }
  ],
  "error": null
}
  • project is the project file relative to the current directory.
  • handler is null if RouteCheck can't tell what handles the route.
  • On an error, error contains the message and the exit code is 1. Otherwise error is null and the exit code is 0.
  • --output markdown prints the same as a Markdown table, e.g. for pull request comments or job summaries.

How it works

RouteCheck builds your app and starts it with dotnet run, adding a startup hook that replaces the web server. Once the app has mapped its endpoints, the hook reads them from ASP.NET Core's routing and stops the app again. So your app never listens on a port, and nothing has to be added to it.

  • Your app's startup code runs as usual, e.g. hosted services or database migrations on startup.
  • The app is started with the environment Development, unless your launch profile or the ASPNETCORE_ENVIRONMENT environment variable sets another one.
  • Startup hooks your app already uses (DOTNET_STARTUP_HOOKS) are kept.

For help run:

routecheck -h

LICENSE

MIT

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
0.2.2 49 11/8/2026
0.2.1 110 10/19/2026
0.2.0 88 10/19/2026
0.1.0 101 10/18/2026
0.0.3 508 11/20/2025
0.0.2 443 11/17/2025
0.0.1 268 11/16/2025