Skip to main content

📝 Markdown Viewer (GitHub-Style)

PyPI Homebrew License: MIT PyPI Downloads

A GitHub-style Markdown viewer for local docs, with file tree, search, and live reload.

A local Markdown documentation browser that:

  • Renders .md files with GitHub-flavored styles
  • Displays a recursive file/folder tree
  • Supports live plain-text filtering (client-side)
  • Supports filename/content search using fd or rg
  • Auto-reloads edited files
  • Dark/light mode toggle
  • Export/Print to PDF
  • Breadcrumb navigation with folder/file icons
  • Highlights current file in tree and auto-expands

🔍 Preview

mdviewer opens a clean, local browser UI to view Markdown files — with a collapsible file tree, file filtering, fuzzy search, and full-text content search built in.

Screenshot showing file tree and search

🚀 Installation

🔧 Option 1: Homebrew (macOS/Linux)

brew tap biaojiang/mdviewer
brew install biaojiang/mdviewer/mdviewer

🐍 Option 2: Python (via pip)

pip install mdviewer

Optionally add an alias:

echo 'alias mdv="mdviewer"' >> ~/.zshrc
source ~/.zshrc
# or symlink
sudo ln -s $(which mdviewer) /usr/local/bin/mdv

🔧 Option 3: Build from Source

# Install Python deps
pip install -r requirements.txt

# Optional: use a venv
python -m venv .venv
source .venv/bin/activate

# Install tools if needing advanced search
brew install fd ripgrep
# or
sudo apt install fd-find ripgrep

# ▶️ Run the Server
python app.py

Open [http://127.0.0.1:5000](http://127.0.0.1:5000/) in your browser.

🛠️ Usage

mdviewer [PATH] or mdv [PATH]

# e.g.:
mdv # serve the current directory and open the browser when Markdown is found
mdv .
mdv /path/to/README.md
mdv --no-open # serve without opening a browser

🚀 Features

  • ✅ GitHub-style rendering via markdown-it-py + GitHub CSS
  • ✅ Footnote references with links to definitions and return links
  • ✅ Auto-expandable file tree using <details>
  • ✅ Live filtering with reset button
  • ✅ Backend-powered search:
    • fd: fuzzy filename matching
    • rg: content search
  • ✅ Flask-based local webserver
  • ✅ MathJax support for LaTeX
  • ✅ Reload current buffer on changes (with livereload)
  • ✅ Font Awesome icons for folders/files
  • ✅ Breadcrumb that reflects navigation path
  • ✅ Highlight + auto-expand tree for active file
  • ✅ PDF/Print export button with clean print CSS

📁 File Structure

.
├── docs
│   └── math
│       └── math-test.md
├── pyproject.toml
├── README.md
├── requirements.txt
├── screenshot.png
└── src
    ├── mdviewer
    │   ├── __init__.py
    │   ├── app.py
    │   ├── cli.py
    │   ├── search
    │   │   ├── __init__.py
    │   │   ├── __pycache__
    │   │   ├── fd_search.py
    │   │   └── rg_search.py
    │   ├── static
    │   │   ├── script.js
    │   │   └── style.css
    │   └── templates
    │       ├── index.html
    │       ├── search.html
    │       └── viewer.html
    └── 

🔍 Search Modes

  • fd: fuzzy filename match (fast)
  • rg: full-text content match (powerful)

⚙️ Keyboard & UI

  • 🌓 Dark/light toggle
  • ⌨️ Live tree filter with reset
  • 🗂 Expandable nested folders
  • 🔗 Click to render .md file in browser
  • 🖨 Export/Print to PDF button
  • 📁 Breadcrumb with Font Awesome icons
  • 📄 Highlight + expand tree for active file

⏭️ Next Steps


📄 License

MIT

Metadata

Release files for mdviewer 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mdviewer 0.4.1
File Size Uploaded
mdviewer-0.4.1.tar.gz 14.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mdviewer 0.4.1
File Interpreter ABI Platform
mdviewer-0.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 28.8 kB

Release files / mdviewer-0.4.1.tar.gz

Download URL mdviewer-0.4.1.tar.gz
Size 14.3 kB
Tags Source
SHA-256 checksum
How to use checksums
73139d2e47eff8aa148200c6767dcd0c42853883fcdae6c041d112b1697dc044
BLAKE2b-256 checksum
How to use checksums
39403ffa33965ed3f7c70173fe90fa7c77ac4a65f16eb9f7480c8b22bda28f58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 15, 2026.

Transparency log

Release files / mdviewer-0.4.1-py3-none-any.whl

Download URL mdviewer-0.4.1-py3-none-any.whl
Size 14.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d90ba5c9ff08bc69b24e26377d128de8b6c8f1e8f0cf3b24983e511902d69f50
BLAKE2b-256 checksum
How to use checksums
815f63fc85b1be208920317add2f61e19d75b8343d53f0124039dd48a7b00ecc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page