Skip to main content

Drop-in single-file Markdown viewer for any folder

Project description

md-viewer-py

md-viewer-py

PyPI version Python versions License

Drop-in Markdown viewer for any folder

A local HTTP server that renders Markdown files in the browser with navigation, search, and editing. Install and run:

pip install md-viewer-py
mdview

Watch the demo
▶ Click to watch the demo

Why mdview?

Point it at any folder and instantly browse your docs - no config files, no build step, no Node.js. It comes with sidebar navigation, global search, table of contents, dark mode, Mermaid diagrams, syntax highlighting, and an in-browser editor with live preview, all powered by Python's stdlib HTTP server and a single dependency (watchdog).

mdview vs. the alternatives

mdview MkDocs / Docusaurus VS Code Preview grip
Setup pip install Config + build + Node.js Already installed pip install
Multi-file navigation
Cross-file search
Live reload ✅ (with plugin)
In-browser editing
Config required None API token
Works offline

Install

pip install md-viewer-py

Or with uv / pipx:

uv tool install md-viewer-py
pipx install md-viewer-py

Then run from any directory:

mdview                        # serve current directory on port 8080
mdview --port 3000            # custom port
mdview /path/to/docs          # custom directory
mdview /path/to/docs -p 3000  # both
mdview --help                 # show all options

All Features

  • Dashboard: grid view of folders and files, macOS Finder-style
  • Dark & light themes: auto-detects OS preference, manual toggle
  • File tree sidebar: collapsible directories with file name filter
  • Global search: search across all files from header with dropdown results
  • In-file search: Cmd/Ctrl+F to find and highlight matches
  • Table of contents: right panel with scroll spy and collapsible groups
  • In-browser editing: edit mode with live preview, save to disk
  • Live reload: instant updates when files change on disk
  • Syntax highlighting: for code blocks in all major languages
  • Mermaid diagrams: rendered inline with error feedback
  • LaTeX math: inline $...$ and block $$...$$ rendered with KaTeX
  • Keyboard shortcuts: full shortcut set with ? modal
  • Print-friendly: clean stylesheet with proper page breaks
  • Proper CLI: --help, --port, --host, --no-browser
  • Minimal dependencies: only watchdog, pip-installable

Keyboard Shortcuts

Key Action
⌘/Ctrl+F Find in current file
⌘/Ctrl+Shift+F Search across all files
Shift Shift Filter files by name
/ Focus search (legacy)
? Show keyboard shortcuts
← ↑ Previous file
→ ↓ Next file
Escape Close search / modal

Examples

How It Works

md-viewer-py is a pip-installable HTTP server built on Python's http.server. It scans the directory for .md files, serves a single-page UI with dark and light themes, and renders Markdown client-side using marked.js from a CDN. No build step, no config files. Just install and run.

Built in public

Follow the development journey:

Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines and the improvements & ideas list for open tasks.

Feel free to open an issue to discuss ideas before starting work.

License

MIT

Install it, use it, uninstall anytime with pip uninstall md-viewer-py.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

md_viewer_py-1.4.0.tar.gz (54.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

md_viewer_py-1.4.0-py3-none-any.whl (69.3 kB view details)

Uploaded Python 3

File details

Details for the file md_viewer_py-1.4.0.tar.gz.

File metadata

  • Download URL: md_viewer_py-1.4.0.tar.gz
  • Upload date:
  • Size: 54.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for md_viewer_py-1.4.0.tar.gz
Algorithm Hash digest
SHA256 6d9549c30d83fb0391936c5a265e17c1430bb940ec2bb2f9babd89aa85f96a92
MD5 9b21e8ef9061d456cf061714c92330aa
BLAKE2b-256 91434b4109f90a6fa6328feaf5ee4d6fd65a385a0ea863b7734e6ed91fbd1931

See more details on using hashes here.

File details

Details for the file md_viewer_py-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: md_viewer_py-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 69.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for md_viewer_py-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a1625e3ab8e0361dd4aea51fdd9aff2d034df2a7ae4296b32b6fb501ac7bcbb7
MD5 921e171e91f1c657bc4ac614b9e6f94a
BLAKE2b-256 1bb8701241527a1fa059e0d5b6467660cae332dae7e49867b7e40f16bc627647

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page