deps - Dependency Graph

Overview

The deps command generates visual dependency graphs for your .NET solutions and projects. You can output in multiple formats: Mermaid markdown, interactive HTML, or SVG images. This helps you understand project relationships and identify circular dependencies.

Syntax

nmbl deps <ProjectOrSolution> [options]

Arguments

Options

Output Formats

The output format is automatically determined by the file extension:

Examples

Generate Mermaid Markdown

nmbl deps MySolution.slnx --output deps.md

Creates a Mermaid diagram that can be viewed in GitHub README files or documentation.

Generate Interactive HTML

nmbl deps MyProject.csproj --output deps.html

Creates an HTML file with an interactive, zoomable dependency graph.

Generate SVG Image

nmbl deps MySolution.slnx --output deps.svg

Creates a high-quality SVG image suitable for documentation or presentations.

Include NuGet Packages

nmbl deps MyProject.csproj --include-nuget --output deps.md

Shows both project dependencies and NuGet package dependencies.

Include NuGet Package Versions

nmbl deps MySolution.slnx --include-nuget-versions --output deps.html

Shows NuGet packages with their version numbers for detailed dependency analysis.

Generate Multiple Formats

# Generate all formats for the same solution
nmbl deps MySolution.slnx --output deps.md
nmbl deps MySolution.slnx --output deps.html
nmbl deps MySolution.slnx --output deps.svg

Creates multiple formats for different use cases.

Use Cases

Documentation

nmbl deps MySolution.slnx --output docs/architecture/dependencies.md

Generate dependency diagrams for your architecture documentation.

Code Reviews

nmbl deps MySolution.slnx --include-nuget --output review.html

Create interactive graphs to help reviewers understand changes.

Identifying Circular Dependencies

The graph visualization makes it easy to spot circular dependencies (cycles in the graph) that should be refactored.

Architecture Validation

# Generate before making changes
nmbl deps MySolution.slnx --output before.svg

# Make architectural changes

# Generate after changes
nmbl deps MySolution.slnx --output after.svg

# Compare the two diagrams