This application is the CLI version of the ERDiagram library.
Please, refer to the library docs for further information about ERDiagram features.
Global installation:
npm install -g @nestorrente/erdiagram-cliYou can also install it for a single project:
npm install --save-dev @nestorrente/erdiagram-clierdiagram <command> [options]Commands:
erdiagram generate <input>: generate the code of an entity-relationship model.erdiagram create-config: create a config file with the default values.
Options:
--help,-h: Show help.--version,-vShow version number.
The generate command generates the output code from an input entity-relationship diagram written using the ERDiagram
language.
Usage:
erdiagram generate -f <format> <input>Required options:
--format <format>,-f <format>: output format. See below the full list of supported formats.
Additional options:
--config <file>,-c <file>: config file path. If not specified, useserdiagram.config.json(if exists).--output <file>,-o <file>: output file path. Prints to standard output if not specified.
Supported output formats:
- Database creation script:
mysqloraclepostgresql,postgressqlitesqlserver,mssql,mssqlserver
- OOP classes/interfaces:
javatypescript,ts
- Diagram:
nomnomlplantuml
The create-config commands generates a config file with the default values.
By default, if the file already exists, it asks for confirmation, but this behaviour can be customized using the
--override and --preserve options.
erdiagram create-configAdditional:
--config <file>,-c <file>: config file path. If not specified, useserdiagram.config.jsonif exists.--overwrite,-w: overwrite existing config file without asking.--preserve,-p: preserve existing config file without asking.