I've been maintaining drizzle-docs-generator, a CLI tool that auto-generates database documentation from Drizzle ORM schemas. We just released v0.6.0 with some nice improvements, and I wanted to share it with the community.
## What it does:
- Generates DBML and Markdown documentation directly from your Drizzle schema
- Automatically extracts JSDoc comments and includes them in the docs
- Creates beautiful Mermaid ER diagrams
- Supports PostgreSQL, MySQL, and SQLite
- Works with both Drizzle v0 (relations API) and v1 (defineRelations)
## Recent improvements (v0.5.0 → v0.6.0):
- *Auto-relation detection*: No config needed – it finds foreign keys automatically
- *Markdown is now default*: Better user experience for most use cases
- *Nullable foreign keys*: Properly visualized in ER diagrams
- *Flexible ER diagrams*: New --no-columns flag to exclude columns when needed
- *Better coverage*: Improved test coverage from 60% → 80%+
## Why I built this:
Drizzle makes schema definition so smooth in TypeScript, but keeping docs in sync is painful. This tool lets your schema be the source of truth.
## Quick example:
```bash npx drizzle-docs generate ./src/db/schema.ts -d postgresql ```
Outputs organized markdown docs with an ER diagram automatically.
## Links:
GitHub: https://github.com/rikeda71/drizzle-docs-generator
NPM: https://www.npmjs.com/package/drizzle-docs-generator
Examples: https://github.com/rikeda71/drizzle-docs-generator/tree/main...
Would love feedback from folks using Drizzle! Are there features you'd like to see? What pain points in your workflow could this help with?
MIT licensed, happy to discuss the architecture and challenges we solved.