An npm tool to visualize your database
and generate SQL with a local Ollama model.
.env
file with the following content:# Change the connection string
DATABASE_URL=postgres://user:password@host:5432/database
From the root folder where the .env
file is present, run:
$npx @predragnikolic/pn-show-db --db=postgres
That will open a browser and visualize your database.
There is support for local Ollama models such as phi3
or sqlcoder
.
phi3
- Phi is a small language model capable of common-sense reasoning and language understanding. It showcases “state-of-the-art performance” among language models with less than 13 billion parameters.sqlcoder
- This 15B completion model generally requires at least 16GB of RAM.--ollama-model=MODEL_NAME
argument is specified, a wand icon will appear in the top left corner.
Download Ollama.
Run $ollama run phi3
to install phi3
.
To use phi3
with @predragnikolic/pn-show-db
, run:
$npx @predragnikolic/pn-show-db --db=postgres --ollama-model=phi3
Христос васкрсе!