CLI Options
mikro-orm-markdown --config ./mikro-orm.config.ts [options]| Option | Default | Description |
|---|---|---|
-c, --config <path> |
(required) | Path to MikroORM config file |
-o, --out <path> |
./ERD.md |
Output Markdown file path |
-t, --title <string> |
Database Schema |
H1 heading of the generated document |
-d, --description <string> |
— | Optional description paragraph shown below the title |
--tsconfig <path> |
— | tsconfig.json used when loading a .ts config; defaults to the nearest one beside the config file |
--src <paths...> |
— | Original TypeScript entity source paths/globs; only needed when MikroORM discovers entities from compiled JavaScript. See Compiled JavaScript builds. |
--exclude-columns <names...> |
— | DB column names to omit from every entity. See Excluding columns. |
--mermaid-layout <layout> |
— | Mermaid layout engine (dagre | elk | elk.stress). Omit to use the viewer’s default. |
--mermaid-theme <theme> |
— | Mermaid theme (default | neutral | dark | forest | base). Omit to use the viewer’s default. |
Config file requirements
Section titled “Config file requirements”The config file must have a default export of a plain configuration object:
export default defineConfig({ ... }); // ✅export const config = defineConfig({ ... }); // ❌ named export not supportedexport default async () => defineConfig({ ... }); // ❌ functions/Promises not supportedIf you need to resolve the config asynchronously, use the programmatic API.