SimpleERD

SimpleERD is a tool to generate beautiful ERD digrams from plain text.

SimpleERD started out as an experiment and is currently at its early stage of development. Consider it a working prototype. SimpleERD is written in Ruby, but this is likely subject for a change.

Installation

There are two installation options on macOS:

bash $ brew tap gmile/apps $ brew install simple-erd --HEAD

Usage

SimpleERD requires a text file as an input. Input file contains text formatted the following way:

[entity_1]
attribute | type

[entity_2]
attribute | type | modifier

[entity_3]
attribute

(entity_group_1)
entity_1
entity_2

(entity_group_2)
entity_3

entity_1 ?--1 entity_2
entity_3 *--n entity_2

Here, [entity_1] starts a block, indicating an entity. Right below [entity_1] come entity attributes. An entity attribute is defined by a attribute_name, type (optional and modifier (optional).

At the bottom of input file – relations between entities. Syntax for relations:

Examples

$ simple-erd -i samples/complex_input.txt -o /tmp/output.pdf

See /samples for more samples.

Motivation

I was inspired by {erd} from Andrew Gallant, but had a couple of issues with it:

Also, I wanted to work on the custom styling of the diagram.

Licence

MIT