Siren
.NET EF Migration to Mermaid ER Diagram
Install / Use
/learn @gman-au/SirenREADME
Siren
<p align="center"> <img style="border-radius:10px;" alt="siren" width="300" src="https://github.com/user-attachments/assets/02251849-902d-46d5-bdd1-a2d16e9be111" /> </p>Summary
It is a simple command line tool that can be installed from NuGet. When run, it will take a C# database migration context assembly, and create an entity relationship (ER) diagram in Mermaid syntax.
Usage
Installation
You can install the siren-gen tool via the following .NET command
dotnet tool install -g Gman.Siren
Running the tool
Run the command as follows:
siren-gen
-a [--assemblyPath] <PATH_TO_MIGRATION_ASSEMBLY>
-c [--connectionString] <DATABASE_CONNECTION_STRING>
-o [--outputPath] <PATH_TO_OUTPUT_MARKDOWN_FILE>
-m [--markdownAnchor] <MARKDOWN_ANCHOR>
-f [--filterEntities] <ENTITIES_TO_INCLUDE>
-s [--skipEntities] <ENTITIES_TO_OMIT>
-h [--filterSchemas] <SCHEMAS_TO_INCLUDE>
-x [--skipSchemas] <SCHEMAS_TO_SKIP>
Main arguments
PATH_TO_MIGRATION_ASSEMBLY(optional, required if connection string not provided) - this will be the location of the built .NET DLL containing the database migration you wish to map to an ER diagram.DATABASE_CONNECTION_STRING(optional, required if assembly not provided) - this can be set to the connection string of a (currently online), accessible database. Siren uses the SchemaSearch library to run compatible system information schema queries using Entity Framework; this is another potential rendering option in the absence of a migration assembly.PATH_TO_OUTPUT_MARKDOWN_FILE(required) - this points to a file (on your local file system) where the markdown should be generated; includes the full file name. The file does not have to be a markdown (.md) file.MARKDOWN_ANCHOR(optional) - this is useful for updatingREADME.mdfiles that may be associated with your domain model (i.e. committed in a git repository). If the markdown anchor is specified, and the output file contains that markdown anchor (for example"### My Domain Model Diagram"), then the Siren tool will only add or replace any existing diagram it finds under that anchor, and leave the rest of the document unmodified.
Filter arguments
ENTITIES_TO_INCLUDE(optional) - comma-separated list of entities to filter (by name).ENTITIES_TO_OMIT(optional) - comma-separated list of entities to omit (by name).SCHEMAS_TO_INCLUDE(optional) - comma-separated list of entities to filter (by schema).SCHEMAS_TO_OMIT(optional) - comma-separated list of entities to omit (by schema).
Example Github action
Related Skills
diffs
326.5kUse the diffs tool to produce real, shareable diffs (viewer URL, file artifact, or both) instead of manual edit summaries.
openpencil
1.1kThe world's first open-source AI-native vector design tool and the first to feature concurrent Agent Teams. Design-as-Code. Turn prompts into UI directly on the live canvas. A modern alternative to Pencil.
ui-ux-pro-max-skill
46.6kAn AI SKILL that provide design intelligence for building professional UI/UX multiple platforms
AI
Notes
