This project provides a tool to generate PlantUML diagrams from C#, C++ and Typescript source code or MS-SQL databases. It supports various language features and can be customized to fit different project structures.
- Class and ER diagrams
- Support for generics, Inline classes, Parameter properties
- Customizable output
- LLVM is used for analyzing CPP files. It must be installed and added to the PATH environment variable.
- Node.js is used for TypeScript analysis. Both Node.js and npm must be installed and accessible.
- A suitable client is required for MS-SQL.
- Roslyn is used for source code analysis for C#.
sourcetoplantuml.exe -?
creates this help output
Description:
Source to PlantUML Helper
Nutzung:
SourceToPlantUML [command] [options]
Optionen:
-?, -h, --help Show help and usage information
--version Versionsinformationen anzeigen
Befehle:
create <outputfile> Parse the directory and all subdirs and create a class diagram or connect to DB Schema and
create a ER diagram.
list List all classes, interfaces, structs, unions, enums, tables and views with or without namespace.
Description:
Parse the directory and all subdirs and create a class diagram or connect to DB Schema and create a ER diagram.
Nutzung:
SourceToPlantUML create <outputfile> [options]
Argumente:
<outputfile> The PlantUML output file
Optionen:
-l, --language <language> The source code language. Supported values are CSharp, CPP, Typescript
and TSQL. [default: CSharp]
-q, --silent Silent mode
-s, --sourcedir <sourcedir> The source directory
-x, --connectionstring <connectionstring> The database connection string
-n, --usenamespace Use namespace as package.
-i, --includenamespaces <includenamespaces> List of namespaces to include
-e, --exclude <exclude> List of directories or files (glob pattern) to exclude
-p, --startpoint <startpoint> The starting point for structure analysis
-c, --includedirs <includedirs> List of directories for include files
-a, --interactive Interactive mode
-t, --stylesheet <stylesheet> A style sheet file
-m, --showmemberusage Show member usage in the diagram.
-?, -h, --help Show help and usage information
Description:
List all classes, interfaces, structs, unions, enums, tables and views with or without namespace.
Nutzung:
SourceToPlantUML list [options]
Optionen:
-l, --language <language> The source code language. Supported values are CSharp, CPP, Typescript
and TSQL. [default: CSharp]
-q, --silent Silent mode
-s, --sourcedir <sourcedir> The source directory
-x, --connectionstring <connectionstring> The database connection string
-n, --usenamespace Use namespace as package.
-i, --includenamespaces <includenamespaces> List of namespaces to include
-e, --exclude <exclude> List of directories or files (glob pattern) to exclude
-p, --startpoint <startpoint> The starting point for structure analysis
-c, --includedirs <includedirs> List of directories for include files
-?, -h, --help Show help and usage information
This commandline analyze a CPP application and produce the class diagram:
SourceToPlantUML.exe create c:\temp\console2.puml -s C:\source\repos\ConsoleApplication2 -n true -l CPP -c "C:\source\vcpkg\installed\x64-windows\include" -a false -q false -m true
And this commandline analyze a MS-SQL database and produce the ER diagram:
>SourceToPlantUML.exe create c:\temp\ef.puml -x Server=XXX;Database=XXX;Trusted_Connection=True;MultipleActiveResultSets=true;TrustServerCertificate=True; -n true -l TSQL -a true
For complete documentation visit full documentation
Contributions are welcome! Please submit a pull request or open an issue for any bugs or feature requests.

