View markdown documentation as a tree. Scan any project, browse .md files in a formatted web viewer with a collapsible sidebar, drag-to-resize, and light/dark theme.
Works in any Node.js project—install globally or as a dev dependency, then run to open a local docs viewer.
# Use with npx (no install)
npx @unseen-media/docMD
# Or install globally
npm install -g @unseen-media/docMD
# Or as a dev dependency
npm install -D @unseen-media/docMD# View docs in current directory
docMD
# View docs in a specific folder
docMD ./docs
# Custom port (default: 3847)
docMD -p 3000
docMD --port 3000Then open http://localhost:3847 (or your chosen port) in your browser.
const docMD = require('@unseen-media/docMD');
// Get tree structure of all .md files
const tree = docMD.getDocTree('./docs');
// => [{ name: 'readme.md', path: 'readme.md', isFile: true }, ...]
// Get flat list of paths
const paths = docMD.getDocPaths('./docs');
// => ['readme.md', 'guides/getting-started.md', ...]- Tree view of all markdown files (nested folders supported)
- Formatted markdown rendering
- Collapsible sidebar with drag-to-resize
- Light/dark theme toggle (persisted)
- Saves sidebar width and collapsed state
- Recursively finds all
.mdfiles - Ignores:
node_modules,.git,dist,build,.next,__pycache__,.cache,coverage,.vscode,.idea - Shows folders only if they contain markdown (directly or in subfolders)
MIT · © Unseen Media