The sqlite-schema-diagram.sql file contains a query which returns a sequence of strings, representing a SQLite database’s schema in GraphViz format. You can save it to a file, or just pipe it to the GraphViz dot command to convert it to your favourite output format: PNG, SVG, PDF, whatever.

Source: Screwtape / sqlite-schema-diagram GitLab