ERD Generator 

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

Installation 

Requirements 

  • TYPO3 12.4
  • PHP 8.2+

Install 

composer require denic/erd
Copied!

Or with DDEV:

ddev composer require denic/erd
Copied!

Usage 

Backend Module 

Go to Web → 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 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

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 

2.x (TYPO3 12) 

  • Upgrade to TYPO3 12.4
  • v12 TCA types, DB population stats
  • PHP 8.2+
  • ModuleTemplateFactory, proper backend styling
  • Fix mermaid reserved words, empty entity blocks
  • Cardinality labels in relations (0:1, 1:n, n:m)
  • TYPO3 extension documentation

1.x (TYPO3 11) 

  • Initial release for TYPO3 11.5
  • TCA schema extractor, relation resolver, Mermaid renderer
  • CLI command and backend module