Registry / data / markmap-cli

markmap-cli

JSON →
library0.18.12jsnpmunverified

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-cli
INSTALL
IMPORT
SIG · MARKMAP-CLI
M
markmap-cli
datajavascriptv0.18.12
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default (CLI)
npx markmap-cli input.md
npx markmap input.md
Package name is markmap-cli, but the binary is markmap. Use npx markmap.
default (programmatic)
import markmap from 'markmap-cli'
const markmap = require('markmap-cli')
ESM-only since v0.15.0. CommonJS require() will throw.
INode
import { INode } from 'markmap-common'
import { INode } from 'markmap-cli'
INode type is exported from markmap-common, not markmap-cli.

Generates an interactive mindmap HTML from a Markdown file using the CLI.

npx markmap-cli@0.18.12 README.md -o mindmap.html
markmap --version
Debug
Known issues
breakingNode data type changed to INode (breaking in v0.18.0)
fix
Update code to use INode type from markmap-common instead of FlextreeNode<INode>.
affects: >=0.18.0
breakingsetData is now asynchronous (breaking in v0.18.0)
fix
Await the promise returned by mm.setData() before accessing rendered DOM.
affects: >=0.18.0
breakingSwitched from Prism.js to highlight.js (breaking in v0.15.0)
fix
Update any syntax highlighting plugins or configuration to use highlight.js instead of Prism.
affects: >=0.15.0
breakingDropped CJS support (breaking in v0.15.0)
fix
Use ESM imports (import syntax) instead of require(). Project must have type: module or use .mjs extensions.
affects: >=0.15.0
deprecatedPrism.js removed in v0.15.0, highlighting is now highlight.js
fix
Use highlight.js compatible themes and configuration. Prism-specific plugins will not work.
affects: >=0.15.0
gotchaScript must be run as a module or with top-level await for async operations
fix
Ensure your environment supports ESM (e.g., type:module in package.json).
affects: >=0.18.0
Errors
Common errors & fixes
Error [ERR_MODULE_NOT_FOUND]: Cannot find module 'markmap-cli'
Attempting to require the ESM-only package using CommonJS require()
fix
Use import syntax: import markmap from 'markmap-cli' instead of require().
TypeError: Cannot read properties of undefined (reading 'props')
Using setData without await after v0.18.0
fix
Add await before mm.setData() call.
Option '--offline' is not supported
Using an older version of markmap-cli that did not have the offline option (added in v0.15.0)
fix
Update to v0.15.0 or later to use --offline flag.
Upgrade
Version history
0.18.12latest on npm
Audit
Dependencies
markmap-librequiredCore library for transforming Markdown to mindmap data
markmap-viewrequiredRenders the mindmap in the browser when generating HTML
Agent activity
5 hits · last 30 days
node
4
Amazon
1
Resources