Configuration

Outputs

Choose where Nest Graph Inspector publishes your dependency graph.

Outputs

outputs tells Nest Graph Inspector where to publish the generated dependency graph. Use one output for a focused workflow, or combine several outputs when your team needs an interactive viewer, committed documentation, and machine-readable data at the same time.

Stability note: outputs beyond Web Viewer are under active iteration, and format-level breaking changes may land between releases while we shape the long-term contract. For dependable day-to-day usage, you can always upgrade to the latest Nest Graph Inspector version to stay aligned with the Viewer experience.

Web Viewer

Usage

{ type: 'viewer' }

Description

The Viewer output is the fastest way to understand a NestJS application visually. It installs a graph endpoint inside your app and connects it to the hosted interactive viewer, so you can explore modules, providers, controllers, imports, exports, and dependencies without opening generated files by hand.

API

APIDescriptionBenefit
type: 'viewer'Enables the interactive web viewer output.Gives developers a visual graph they can open from the console message after the app starts.
origin?: stringThe public or local origin of your running NestJS app, for example http://localhost:3000.Prints a direct viewer link that already knows where to load graph data from. This is ideal for shared local setup, demos, and environment-based configuration.
path?: stringThe route path used to serve the graph endpoint. Defaults to /__graph-inspector.Lets you avoid route conflicts and match your app's internal route naming.

Markdown

Usage

{ type: 'markdown', path: 'graph.md' }

Description

The Markdown output turns your dependency graph into durable project documentation. It writes a .md file with a Mermaid diagram and module-by-module details, making it a strong fit for repository docs, pull request reviews, architecture notes, and onboarding material.

API

APIDescriptionBenefit
type: 'markdown'Enables Markdown file generation.Produces readable documentation that can live beside your source code.
path: stringFile path for the generated Markdown file, resolved from the current working directory.Keeps the graph easy to find, commit, review, or publish with your existing docs workflow.
Mermaid diagrams render natively on GitHub. For local viewing, use a Mermaid-compatible Markdown viewer or install a VSCode extension.

JSON

Usage

{ type: 'json', path: 'graph.json' }

Description

The JSON output gives you the raw module map in a structured format. Use it when you want to build custom checks, compare graph snapshots, feed another visualization tool, or automate architecture reporting in CI.

API

APIDescriptionBenefit
type: 'json'Enables JSON file generation.Creates a stable data artifact for tools, scripts, and automated analysis.
path: stringFile path for the generated JSON file, resolved from the current working directory.Makes the output predictable and easy to consume from CI jobs, local scripts, or custom dashboards.

HTTP Endpoint

Usage

{ type: 'http' }

Description

The HTTP output serves the graph directly from your running NestJS application. It is useful when another service, dashboard, test runner, or browser-based tool needs live graph data without reading from the filesystem.

With the default path, the graph is available at:

  • /__nest-graph-inspector for the JSON graph endpoint used by the viewer
  • /__nest-graph-inspector/output.json for the raw JSON graph output
  • /__nest-graph-inspector/output.md for the markdown graph output

API

APIDescriptionBenefit
type: 'http'Enables JSON and markdown graph endpoints in your NestJS app.Makes the current dependency graph available over HTTP as soon as the app is running.
path?: stringRoute path used to serve the graph. Defaults to /__nest-graph-inspector.Lets you expose graph data at a route that fits your app conventions, such as /internal/graph or /debug/dependencies.
Nest Graph Inspector · MIT License · © 2026