AI diagram generator

AI database schema diagram generator.

The physical view: tables, columns, keys and indexes, for when you need what is actually stored rather than the conceptual model.

Download for macOS
v0.1.33 · .dmg · Apple Silicon & Intel
Signed & notarized by Apple · opens without a Gatekeeper warning
sha256 698955a0187bc039f4c74f5d05a9f10fbb27376a45788a0a241d1326b73873c7
Download for Windows instead
$curl -fsSL https://lucidtrain.com/install.sh | sh

Schema diagram or entity diagram

They are frequently confused and answer different questions. An entity diagram describes the domain and deliberately hides storage, so join tables become relationships. A schema diagram describes what is physically there, including join tables, indexes and column types, and is what you want when reviewing a migration or reasoning about a slow query. Both are useful; using one where the other was wanted is why some database diagrams feel unhelpful.

How Lucid Train draws one

Describe what you want, or point it at a repository. The agent emits a semantic graph of nodes and edges with no coordinates, and the ELK layout engine computes positions and orthogonal routing. That separation is the reason the output cannot come back with boxes overlapping or arrows crossing through cards, which is the characteristic failure when a language model is asked to place things on a canvas itself. It also means editing is editing the graph: change a component and the layout re-solves rather than drifting out of alignment.

Indexes belong on it

A schema diagram without indexes leaves out most of what determines whether the database performs. Showing which columns are indexed, and which indexes are composite and in what order, turns the diagram into something you can use during a query review rather than only during design.

Reading migrations rather than a dump

Most application repositories contain migrations rather than a checked-in schema, so the current shape has to be reconstructed by applying them in order. That works and takes longer on a long history, which is the argument for keeping a generated schema dump in the repository regardless.

Local, offline, your models

It runs as a desktop application. Against a local Ollama model the whole thing works offline with no API key and no telemetry, which is the practical difference from every browser-based diagram tool: your architecture never leaves the machine.

Schema elements drawn

ElementShown as
TableA component with its columns
Column with typeAn attribute, type included
Primary keyMarked on the identifying column
Foreign keyAn edge with direction
Unique constraintNoted, and used to determine cardinality
IndexA note listing the columns in order
Composite keyThe full column list, since order matters
Check constraintA note on the column
ViewDrawn separately from tables

Try it

shell
$ Read the migrations in this directory and draw the current database schema: tables, columns with types, keys, indexes and foreign keys.
FAQ

Questions

Does it connect to my database?

No. It reads DDL, migrations or ORM definitions from disk, so it needs no credentials and works against databases you cannot reach.

Schema diagram or ER diagram?

Schema for reviewing migrations and query performance, entity for discussing the domain. It can draw either from the same source.

Can it diagram a schema with hundreds of tables?

It can, and nobody will read it. Scoping to a subsystem, or generating per module, is what produces something useful.

Does it show indexes?

Yes, including composite indexes with their column order, which is the detail that decides whether an index is usable for a given query.

Related