markmap-cli v0.18.12 is a command-line tool to convert Markdown files into interactive mind maps (markmaps). It uses the markmap library to parse Markdown and generate HTML output. This version requires Node.js >=18 and is ESM-only (no CommonJS support). Drop-in replacement for generating mindmap HTML from Markdown files. Frequently updated, with breaking changes in recent versions including async setData, INode type changes, and migration from Prism.js to highlight.js.
npm install markmap-cliVerified import paths — ran on the pinned version, not inferred.
Generates an interactive mindmap HTML from a Markdown file using the CLI.
Update code to use INode type from markmap-common instead of FlextreeNode<INode>.
Await the promise returned by mm.setData() before accessing rendered DOM.
Update any syntax highlighting plugins or configuration to use highlight.js instead of Prism.
Use ESM imports (import syntax) instead of require(). Project must have type: module or use .mjs extensions.
Use highlight.js compatible themes and configuration. Prism-specific plugins will not work.
Ensure your environment supports ESM (e.g., type:module in package.json).
Use import syntax: import markmap from 'markmap-cli' instead of require().
Add await before mm.setData() call.
Update to v0.15.0 or later to use --offline flag.