@pruddiman/mdmirror
v0.1.1
Published
Zero-config CLI tool that turns any folder of markdown files into a browsable documentation site
Maintainers
Readme
mdmirror
Zero-config CLI that turns any folder of Markdown files into a browsable documentation site.
npx @pruddiman/mdmirror ./docsPoint it at a directory and it discovers every .md and .txt file, derives URL slugs from the folder structure, builds a hierarchical sidebar, renders Markdown to HTML with syntax highlighting and Mermaid diagrams, and wraps it all in a responsive theme — no config needed.
Install
npm install -g @pruddiman/mdmirrorOr run directly with npx:
npx @pruddiman/mdmirror <path>Usage
Development server
mdmirror <path> [--port <port>] [--host <host>]Starts a live-reloading server. Changes to any source file trigger an instant rebuild.
| Argument | Default | Description |
|----------|---------|-------------|
| path | required | Source folder containing .md/.txt files |
| --port, -p | $PORT or 3000 | Port to serve on |
| --host | localhost | Bind address |
Static build
mdmirror build <path> [--output <dir>]Generates a self-contained static site for deployment to any static host.
| Argument | Default | Description |
|----------|---------|-------------|
| path | required | Source folder |
| --output, -o | ./dist | Output directory |
Features
- Zero config — no config files, no frontmatter schema required
- GFM — tables, strikethrough, task lists, autolinks
- Syntax highlighting — via Shiki
- Mermaid diagrams — fenced code blocks with
mermaidlanguage tag - Full-text search — client-side, no server required
- Live reload — WebSocket-based, instant on file save
- Clean URLs — slugs derived from directory structure, collisions auto-resolved
- Self-contained output — every HTML page is fully standalone
Requirements
Node.js >= 18.0.0
License
ISC
