# sqlant
Generate PlantUML/Mermaid ER diagram textual description from SQL connection string
**Inspired by [planter](https://github.com/achiku/planter)**
## Installation
### Compiled Binary (Linux only)
Download the binary file from [releases](https://github.com/kurotych/sqlant/releases) page
### Docker (Compressed size around 6MB)
The Docker image contains the `sqlant` binary and serves as a wrapper for executing it.
[link](https://hub.docker.com/r/kurotych/sqlant)
```bash
docker pull kurotych/sqlant:latest
```
### Cargo
```bash
cargo install sqlant
```
## Usage
### PlantUML
#### Binary
```bash
sqlant postgresql://sqlant_user:sqlant_pswd@localhost/sqlant_db --legend -e
```
#### Docker
```bash
docker run --network host kurotych/sqlant postgresql://sqlant_user:sqlant_pswd@localhost/sqlant_db
```

```
postgresql://sqlant_user:sqlant_pswd@localhost/sqlant_db -o mermaid
```
### Mermaid

## Links
- [Optimizing the Process of ER Diagram Creation with PlantUML](https://kurotych.com/posts/er-diagram-creation/)