← All tools

FHX23/Routier

Popularity 65 Updated Development & Build

Generate OpenAPI, Postman and Insomnia collections from Next.js, Express, Fastify, NestJS and GraphQL source code

githubauto-collected

Installation

A directly usable install command is not verified yet. Check the project documentation or releases.

Routier

Routier scans the source code of your API and generates ready-to-import OpenAPI 3, Postman and Insomnia collections — no decorators, annotations or running server required.

It supports Next.js (App Router and Pages Router), Express, Fastify, NestJS and GraphQL schemas, and infers auth headers, query parameters and example request bodies from your Zod schemas, JSON Schemas and DTOs.

Leer en español

$ npx routier export --base-url http://localhost:3000

●  12 REST endpoints, 4 GraphQL operations
◆  Written routier-exports/routier-openapi.json
◆  Written routier-exports/routier-postman.json
◆  Written routier-exports/routier-insomnia.json

Contents

  • Installation
  • Quick start
  • What Routier detects
  • CLI reference
  • Configuration file
  • Using Routier as a library
  • Limitations
  • Roadmap
  • Contributing

Installation

Routier requires Node.js 22.12 or newer.

# Run it once without installing
npx routier scan

# Or add it to your project
npm install --save-dev routier
pnpm add -D routier

# Or install it globally
npm install -g routier

Quick start

From the root of your project:

# 1. See what Routier finds
routier scan

# 2. Generate the collections
routier export --base-url http://localhost:3000

The files are written to ./routier-exports inside the scanned project:

| File | Import it into | | --- | --- | | routier-openapi.json | Swagger UI, Redoc, Bruno, Hoppscotch, Scalar, Postman, Insomnia… | | routier-postman.json | Postman → Import → select the file | | routier-insomnia.json | Insomnia → Import → select the file |

The collections include a baseUrl variable plus a token variable used by every request that needs Authorization: Bearer …, so you only fill them in once.

What Routier detects