https://github.com/kaishuu0123/erd-go
Translates a plain text description of a relational database schema to a graphical entity-relationship diagram.(convert to dot file)
https://github.com/kaishuu0123/erd-go
diagram diagramming dot erd go golang peg translates
Last synced: 20 days ago
JSON representation
Translates a plain text description of a relational database schema to a graphical entity-relationship diagram.(convert to dot file)
- Host: GitHub
- URL: https://github.com/kaishuu0123/erd-go
- Owner: kaishuu0123
- License: mit
- Created: 2018-01-17T11:49:40.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-02-11T01:59:04.000Z (about 4 years ago)
- Last Synced: 2025-03-28T22:12:58.260Z (27 days ago)
- Topics: diagram, diagramming, dot, erd, go, golang, peg, translates
- Language: Go
- Size: 594 KB
- Stars: 126
- Watchers: 3
- Forks: 37
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# erd-go
[][releases]
[](https://travis-ci.org/kaishuu0123/erd-go)
[](https://coveralls.io/github/kaishuu0123/erd-go)
[][docker][releases]: https://github.com/kaishuu0123/erd-go/releases
[docker]: https://hub.docker.com/r/kaishuu0123/erd-go/Translates a plain text description of a relational database schema to a graphical entity-relationship diagram.(convert to dot file)

## Install
get binary from [releases page](https://github.com/kaishuu0123/erd-go/releases).
or
```shell
go get github.com/kaishuu0123/erd-go
```or (for Mac)
```shell
brew tap kaishuu0123/erd-go
brew install erd-go
```## Usage
```shell
Usage:
erd-go [OPTIONS] PATTERN [PATH]Application Options:
-i, --input= input will be read from the given file.
-o, --output= output will be written to the given file.Help Options:
-h, --help Show this help message
```support input from STDIN.
```shell
cat examples/nfldb.er | erd-go
```ex.) convert to png from dot (use dot command)
```shell
cat examples/nfldb.er | erd-go | dot -Tpng -o nfldb.png
```## Usage (Used by Docker container)
```shell
cat examples/nfldb.er | docker run --rm -i kaishuu0123/erd-go | docker run --rm -i risaacson/graphviz dot -T png > nfldb.png
```## Example
see [examples directory](https://github.com/kaishuu0123/erd-go/blob/master/examples)
## Build Instruction
1. install glide
```shell
go get github.com/Masterminds/glide
```1. install go-bindata
```shell
go get github.com/jteeuwen/go-bindata
```1. install peg
```shell
go get github.com/pointlander/peg
```1. make
```shell
make
```## LICENSE
MIT
## Credits
This work is based off of several existing projects:
*
*