Sqleton is a command-line utility and Node.js library designed to visualize SQLite database schemas. It takes a SQLite database file or object and generates a graphical diagram, typically in formats like SVG, PNG, or PDF, by utilizing the external Graphviz engine for rendering. The current stable version is 4.0.0. While no explicit release cadence is documented, the project appears to be actively maintained. Key differentiators include its singular focus on SQLite, offering both a straightforward CLI for quick visualizations and a programmatic API for integration into Node.js applications. It provides options for customizing the graph layout, adding edge labels for foreign keys, specifying titles, fonts, and graph direction. Although it strictly supports SQLite, users can potentially visualize other database schemas by converting them to a SQLite format first.
npm install sqletonVerified import paths — ran on the pinned version, not inferred.
Demonstrates programmatic use of `sqleton` to generate an SVG diagram of a simple SQLite schema. It sets up an in-memory database with tables and foreign keys using `better-sqlite3`, then pipes the output to a file, also handling potential Graphviz execution errors.
Install Graphviz on your operating system. Common installation commands include: `brew install graphviz` (macOS), `sudo apt-get install graphviz` (Debian/Ubuntu), `pacman -Sy graphviz` (Arch Linux). Refer to http://www.graphviz.org/download/ for platform-specific instructions.
Ensure you are using a SQLite database. For other database systems, consider using dedicated visualization tools for that specific database or evaluating if a schema conversion to SQLite is feasible for visualization purposes.
Install Graphviz on your system. For example: `brew install graphviz` (macOS) or `sudo apt-get install graphviz` (Debian/Ubuntu).
Use the CommonJS `require` syntax: `const sqleton = require('sqleton');`Verify the path to your SQLite database file and ensure it exists and is readable by the process running `sqleton`.
No dependency data recorded yet.