Mongoose-erd-generator

A tool that extracts information from mongoose schemas and turns them into a ERD diagram.

Build Status bitHound Dependencies bitHound Overall Score issues stars license

ERD Diagram generated from this tool Installation

npm install mongoose-erd-generator -g

Running the script

Usage: mongoose-erd-generator [options]

Options:
-V, --version                                                 output the version number
-p, --path <path>                                             set models path wanted to generate an ERD from.
-o, --output <path>                                           set output path
-i, --ignore-index                                            ignore any files called index.js
-f, --format [svg,dot,xdot,plain,plan-ext,ps,ps2,json,json0]  
-c, --color <color>                                           
-h, --help                                 

example

Global install:

npm install mongoose-erd-generator -g

Run CMD:
MAC / LINUX

mongoose-erd-generator -p ./path_to_models_folder/ -f svg -o ./erd.svg

WINDOWS

mongoose-erd-generator -p .\path_to_models_folder\ -f svg -o .\erd.svg