md-explorer
v1.0.8
Published
Web-based file explorer for Markdown & HTML
Maintainers
Readme
md-explorer
A web-based file explorer for browsing and reading Markdown and HTML files. Point it at any directory and get a navigable file tree with rendered Markdown preview.
Install
npm install -g md-explorerOr run directly with npx:
npx md-explorer ./docsUsage
md-explorer [directory] [options]Arguments
| Argument | Description |
|-------------|------------------------------------------|
| directory | Directory to serve (default: current dir)|
Options
| Option | Description |
|------------------|--------------------------------------------------|
| -p, --port PORT| Port to listen on (default: 3000, or PORT env) |
| -h, --help | Show help message |
Examples
# Serve current directory on default port
md-explorer
# Serve a specific directory
md-explorer ./docs
# Serve on a custom port
md-explorer ./docs --port 8080
# Use PORT environment variable
PORT=4000 md-explorer ~/notesFeatures
- Collapsible, resizable file tree sidebar with lazy-loaded subdirectories
- Rendered Markdown preview using marked
- Inline HTML/HTM file viewing via iframe
- File search with instant results from a cached index
- Recent files list persisted across sessions
- Right-click context menu: open in new tab, copy path
- URL-based routing with browser back/forward support
- Sidebar width and recent files scoped per directory
- Dot-files and
node_modulesare hidden automatically - Path traversal protection on all API routes
License
MIT
