
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Convert SQLite database schemas into Entity Relationship Diagrams (ERDs) using GraphViz.
--png
flagRequires Python 3.12+ and uvx.
# Install GraphViz (required for image generation)
# macOS: brew install graphviz
# Ubuntu: sudo apt-get install graphviz
# Windows: https://graphviz.org/download/
# Run directly from PyPI without installing
uvx sqlite-to-erd database.db
# Clone the repository
git clone https://github.com/knowsuchagency/sqlite-to-erd.git
cd sqlite-to-erd
# Install dependencies
uv sync
# Install GraphViz (for image generation)
# macOS: brew install graphviz
# Ubuntu: sudo apt-get install graphviz
# Windows: https://graphviz.org/download/
With uvx (run directly from PyPI):
# Generate DOT format output
uvx sqlite-to-erd database.db
# Generate PNG directly
uvx sqlite-to-erd database.db --png schema.png
# Use simple box format instead of HTML tables
uvx sqlite-to-erd database.db --simple
With local installation:
# Generate DOT format output
uv run sqlite_to_erd.py database.db
# Generate PNG directly
uv run sqlite_to_erd.py database.db --png schema.png
# Pipe to GraphViz for other formats
uv run sqlite_to_erd.py database.db | dot -Tsvg -o schema.svg
# Use simple box format instead of HTML tables
uv run sqlite_to_erd.py database.db --simple
# Combine options
uv run sqlite_to_erd.py database.db --simple --png simple_schema.png
# Test with included examples
just fk-png # Creates test_fk.png
just complex-png # Creates complex_test.png
The tool generates GraphViz DOT format, which can be:
dot
, neato
, fdp
, etc. for different layoutsecho "
CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT);
CREATE TABLE posts (
id INTEGER PRIMARY KEY,
user_id INTEGER,
title TEXT,
FOREIGN KEY (user_id) REFERENCES users(id)
);
" | sqlite3 blog.db
# With uvx
uvx sqlite-to-erd blog.db --png blog.png
# Or with local installation
uv run sqlite_to_erd.py blog.db --png blog.png
# Run tests
just fk # Test foreign key visualization
just complex # Test complex schema
# Generate test images
just fk-png
just complex-png
This project is licensed under the MIT License. See the LICENSE file for details.
Pull requests welcome! Please test your changes with the included test databases.
FAQs
Generate ERD diagrams from SQLite databases
We found that sqlite-to-erd demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.