mcdg 1.1.0

dotnet tool install --global mcdg --version 1.1.0
                    
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 mcdg --version 1.1.0
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=mcdg&version=1.1.0
                    
nuke :add-package mcdg --version 1.1.0
                    

Mermaid Class Diagram Generator (mcdg)

What is mcdg

mcdg (Mermaid Class Diagram Generator) is a dotnet tool for generating mermaid.js class diagrams directly from C# source code (.cs files).

Unlike other tools that require compiled assemblies (DLLs), mcdg uses Roslyn to parse your source code files recursively from a directory. This allows you to generate diagrams for projects that may not currently build or to quickly visualize a folder of scripts.

Credits

This project is a source-code analysis port of dll2mmd. The core graph generation logic and structure were originally written by rtfs, and this project adapts that logic to work with the Microsoft.CodeAnalysis (Roslyn) API instead of reflection.

Installing mcdg

  1. Install .Net SDK 6.0 or later.

  2. Install mcdg as a global dotnet tool.

    $ dotnet tool install --global mcdg
    You can invoke the tool using the following command: mcdg
    Tool 'mcdg' (version '1.0.0') was successfully installed.
    

    Alternatively, if running from source:

    $ dotnet run --project src/MermaidClassDiagramGenerator/MermaidClassDiagramGenerator.csproj -- [options]
    

Usage

Description:
  Generate mermaid.js class-diagram from C# source code files.

Usage:
  mcdg [options]

Options:
  -o, --output <output>           Output file. [default: output.md]
  -ns, --namespace <namespace>    Namespace filter. []
  -p, --path <path> (REQUIRED)    Path to the folder containing .cs files.
  -t, --type-names <type-names>   Specific classes to include. []
  --ignore-dependency             If true, skip dependency arrows.
  --version                       Show version information
  -?, -h, --help                  Show help and usage information
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 was computed.  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 was computed.  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
1.1.0 18,519 12/14/2025

v1.1.0: Enhanced type detection, partial class support, visibility filtering, system type exclusion, improved error handling, nested generics support