ERD Generator 

Generate ER diagrams from TYPO3 TCA — Mermaid output, backend module, CLI.

Installation 

Requirements 

  • TYPO3 14
  • PHP 8.3+

Install 

composer require denic/erd
Copied!

Or with DDEV:

ddev composer require denic/erd
Copied!

Usage 

Backend Module 

Go to System → ERD Generator.

  1. Pick an extension or select tables.
  2. Set depth.
  3. Optionally enable DB population check.
  4. Hit Generate ERD.

You get the Mermaid code, a full Markdown doc, and per-table field lists. Copy or download as .md.

CLI 

vendor/bin/typo3 erd:generate --extension=my_ext
vendor/bin/typo3 erd:generate --extension=my_ext --output=docs/erd.md --check-db
vendor/bin/typo3 erd:generate --list-extensions
vendor/bin/typo3 erd:generate --list-tables
vendor/bin/typo3 erd:generate tx_myext_domain_model_person tx_myext_domain_model_address
Copied!

Options 

Flag What it does Default
-e, --extension Extension key  
-o, --output Write to file instead of stdout  
-d, --depth Relation depth (0, 1, 2, -1=all) 2
-l, --lang Label language de
--check-db Show field population % off
--include-empty Keep 0% fields (needs --check-db) off
--include-internal Show uid, pid, hidden, etc. off
--no-core-tables Skip sys_category, sys_file_reference off
--list-extensions List extensions and exit  
--list-tables List tables and exit  

Output 

The .md file contains a Mermaid erDiagram block, field tables per entity, a relations overview, and cardinality labels (0:1, 1:n, n:m).

Viewing 

Open the .md in:

  • Obsidian — renders Mermaid natively
  • Markdown Viewer — online viewer
  • GitHub / GitLab — renders Mermaid in Markdown automatically

Configuration 

No TypoScript needed. Everything is set per run in the backend form or via CLI flags.

See Usage for all available options.

Changelog 

4.x (TYPO3 14) 

  • Move backend module from Web to System group (full width, no page tree)
  • Move inline JS to external file for CSP compliance
  • Theme-aware module icon (adapts to modern/classic/fresh, light/dark)
  • ModuleTemplateFactory, proper backend styling
  • Fix mermaid reserved words (fk, text, etc.)
  • Fix empty entity blocks
  • Cardinality labels in relations (0:1, 1:n, n:m)
  • Copy to clipboard, download .md
  • json and uuid TCA field types
  • TYPO3 extension documentation

3.x (TYPO3 13) 

  • Move backend module from Web to System group
  • Move inline JS to external file for CSP compliance
  • Upgrade to TYPO3 13.4
  • --list-extensions, --list-tables CLI options
  • Fix population query on missing DB columns
  • ModuleTemplateFactory, proper backend styling

2.x (TYPO3 12) 

  • Move backend module from Web to System group
  • Move inline JS to external file for CSP compliance
  • Upgrade to TYPO3 12.4
  • v12 TCA types, DB population stats
  • PHP 8.2+

1.x (TYPO3 11) 

  • Move backend module from Web to System group
  • Refactor templates to use Fluid form ViewHelpers
  • Initial release for TYPO3 11.5
  • TCA schema extractor, relation resolver, Mermaid renderer
  • CLI command and backend module