Installation & Requirements
Install
Section titled “Install”npm install -D mikro-orm-markdown# orpnpm add -D mikro-orm-markdownRequirements
Section titled “Requirements”- Node.js >= 22.17
- MikroORM 6 or 7 —
@mikro-orm/coreis a peer dependency with the range>=6.0.0 <8. - A MikroORM config file — the CLI expects a default export of a plain MikroORM options object.
- The matching MikroORM driver package — for example
@mikro-orm/postgresql,@mikro-orm/mysql,@mikro-orm/mariadb, or@mikro-orm/sqlite. A live database connection is not required, but MikroORM still needs the driver to discover metadata. - Decorator or schema-defined entities —
@Entity()classes read JSDoc from the class. Entities defined withEntitySchema(or MikroORM 7’sdefineEntity(), which builds on it) render identically and read JSDoc from the exported schema declaration — see Schema-defined entities. - On MikroORM 7, import decorators from
@mikro-orm/decorators— v7 moved them out of@mikro-orm/coreinto@mikro-orm/decorators/legacy(TypeScriptexperimentalDecorators) and@mikro-orm/decorators/es(ES-standard decorators). Both work with this tool; on v6 they stay in@mikro-orm/core. - Resolvable property types — each entity property’s type must be known during MikroORM discovery. Use explicit decorator options such as
type:/entity:, or install@mikro-orm/reflectionso the CLI can auto-useTsMorphMetadataProviderfor TypeScript sources. tsxfor TypeScript config files — required when loading a.tsMikroORM config through the CLI. A.jsconfig needs no extra package, but the CLI registerstsxonly for.tsconfigs, so any.tsentity file a.jsconfig imports is loaded by Node.js itself. That works only on Node.js 22.18+ for schema-defined entities written in erasable-only TypeScript; decorator-based entities fail to load. Otherwise, import compiled.jsentities or use a.tsconfig.
Agent Skill (optional)
Section titled “Agent Skill (optional)”Agent users (Claude Code and other Agent Skills-compatible tools) can optionally use the Agent Skill at skills/mikro-orm-markdown/ to set up and troubleshoot this tool. It is not part of the npm package.