DimonSmart.DbSketch
0.1.7
Prefix Reserved
See the version list below for details.
dotnet tool install --global DimonSmart.DbSketch --version 0.1.7
dotnet new tool-manifest
dotnet tool install --local DimonSmart.DbSketch --version 0.1.7
#tool dotnet:?package=DimonSmart.DbSketch&version=0.1.7
nuke :add-package DimonSmart.DbSketch --version 0.1.7
DbSketch
DbSketch turns a live database into a version-controlled schema diagram.
It reads tables, columns, primary keys, foreign keys, and comments directly from SQL Server, PostgreSQL, or MySQL, then writes documentation you can commit, review, and refresh from CI.
Compact layout, using tableHeaderLayout: "{fullName}" and columnLayout: "{name}":

Full layout, using tableHeaderLayout: "{fullName} | {comment}" and columnLayout: "{name} | {type} | {comment} | {keys}":

Why DbSketch?
- Reads live SQL Server, PostgreSQL, and MySQL schemas
- Generates Graphviz DOT, Mermaid ER, or Markdown-wrapped output
- Supports multiple focused diagrams from one config
- Preserves precise column-to-column foreign key edges in DOT
- Can include database-native table and column comments
- Works locally, in CI, or as a repository documentation step
Quick start
dotnet tool install --global DimonSmart.DbSketch
dbsketch generate --config dbsketch.yml
DbSketch also works as a local repository tool. See Getting started for local tool, one-shot, dnx, and CI examples.
Minimal config
provider: postgres
connectionString: "${DB_CONNECTION}"
defaults:
output:
format: markdown
markdown:
fenceLanguage: dot
diagram:
renderer: dot
direction: LR
compact: true
show:
schemaName: true
columnTypes: false
nullability: false
primaryKeys: true
foreignKeys: true
foreignKeyLabels: false
diagrams:
- name: full
title: Database schema
include:
tables:
- "public.*"
exclude:
tables:
- "public.__EFMigrationsHistory"
output:
path: docs/db/schema.md
Output formats
- DOT: best for precise technical diagrams and column-to-column relationships.
- Mermaid: convenient for GitHub Markdown, with entity-level relationships.
- Markdown: useful for generated docs because it wraps DOT or Mermaid in a fenced block.
Documentation
Use with AI assistants
Want to add DbSketch to an existing repository? Paste this into ChatGPT, Claude, or Codex:
Add DbSketch database diagram generation to this repository. Create a
dbsketch.ymlthat readsDB_CONNECTION, generates focused database diagrams underdocs/db, and adds a CI step to refresh them.
Contributing
Issues and pull requests are welcome, especially focused fixes, provider improvements, renderer improvements, and documentation updates.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.21 | 124 | 8/13/2026 |
| 0.1.20 | 106 | 8/13/2026 |
| 0.1.19 | 92 | 8/12/2026 |
| 0.1.18 | 101 | 8/12/2026 |
| 0.1.17 | 117 | 7/6/2026 |
| 0.1.16 | 118 | 7/6/2026 |
| 0.1.15 | 120 | 7/6/2026 |
| 0.1.14 | 115 | 7/3/2026 |
| 0.1.13 | 116 | 7/3/2026 |
| 0.1.12 | 112 | 7/3/2026 |
| 0.1.11 | 125 | 7/3/2026 |
| 0.1.10 | 123 | 7/3/2026 |
| 0.1.9 | 123 | 7/3/2026 |
| 0.1.8 | 123 | 7/2/2026 |
| 0.1.7 | 108 | 7/2/2026 |
| 0.1.6 | 138 | 7/1/2026 |
| 0.1.5 | 129 | 7/1/2026 |
| 0.1.4 | 124 | 7/1/2026 |
| 0.1.3 | 139 | 6/30/2026 |