Skip to main content

mdshelf

Browse the Markdown files in any folder, locally. Point it at a repo or a docs folder and read it like a small docs site, with the tools you want when you're reviewing, not just reading.

  • Sidebar with filter and collapsible folders (collapse it fully, or drag its edge to resize)
  • Page width you control: S / M / L / Full, or a slider
  • "On this page" outline that follows your reading position
  • Mermaid diagrams, tables, task lists, code blocks with a copy button
  • Light, dark or automatic theme; adjustable text size
  • Highlights in four colours, listed in the outline panel
  • Comments shown in the right margin, level with the text they refer to
  • Share selected text to WhatsApp, Teams, Email, or copy it as a Slack or Markdown quote
  • Archive / restore a doc with confirmation (moves it into an archived/ folder and back)

Python standard library only. Works offline: the Markdown renderer, Mermaid and fonts ship inside the package. Nothing is uploaded anywhere.

Install and run

pip install mdshelf        # or: pipx install mdshelf   /   uvx mdshelf
mdshelf                    # browse the current folder
mdshelf ~/path/to/project --port 9000

Python 3.9 or newer.

Option Meaning
FOLDER folder to browse (default: current directory)
-p, --port port on 127.0.0.1 (default 8780)
--no-open don't open a browser tab
--title name in the sidebar (default: the folder's name)
--archive-dir where Archive moves files, relative to FOLDER (default archived)
--exclude DIR extra directory name to skip everywhere (repeatable)
--read-only disable Archive/Restore so the server never changes a file

.git, node_modules, .venv, dist, build, vendor and cache folders are always skipped.

Where your notes live

Highlights and comments are saved in your browser (localStorage), per folder and per file, not in your repo. They survive reloads and edits to the Markdown, because each one is stored as the quoted text plus a little context rather than a position. If the quoted text is deleted, the note stays in the list marked "not found" so you can remove it. Clearing site data or using another browser or machine starts you with no notes. Archive and restore carry a file's notes along.

Archive

Archive moves a doc to <folder>/archived/<same path> and Restore moves it back, refusing if something already exists at the destination. If the folder is under git, add archived/ to .gitignore to keep archived files out of commits (git will show them as deleted). Use --read-only to turn this off.

Security model

  • Binds to 127.0.0.1 only. There is no option to listen on other interfaces.
  • Serves only .md files under the folder you pass, plus its bundled assets. Paths that escape the folder, or point into skipped folders, are refused.
  • The only write is Archive/Restore. It accepts requests only from its own page: the Host and Origin headers must be local and a custom header must be present, which blocks DNS-rebinding and cross-site requests.
  • Share opens a link to the chosen service (WhatsApp, Teams, mail) with the selected text in the URL, only when you press the button. Slack and Markdown copy to the clipboard. Check what you select before sharing.
  • Rendered Markdown is shown as HTML without sanitising, so only browse folders you trust.

Develop

git clone https://github.com/ShamiqTheDev/mdshelf && cd mdshelf
python -m venv .venv && . .venv/bin/activate
pip install -e .
python -m unittest discover -s tests -v
mdshelf tests --no-open      # or any folder

The viewer is one HTML file, src/mdshelf/static/index.html, with no build step. Bundled third-party files and licences are listed in THIRD_PARTY_NOTICES.md.

Licence

MIT, see LICENSE. Bundled fonts are under the SIL Open Font License 1.1; see licenses/.

Metadata

Release files for mdshelf 0.1.0

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

Source distribution (sdist)

Source distribution for mdshelf 0.1.0
File Size Uploaded Provenance Actions
mdshelf-0.1.0.tar.gz 1.1 MB Without provenance Details for mdshelf-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 2.2 MB

Release files / mdshelf-0.1.0.tar.gz

Download URL mdshelf-0.1.0.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
5beb3190e0ea83d8792af3b5ee15f32839fc319761890554d54cfef14dc319ff
BLAKE2b-256 checksum
How to use checksums
2ea6887162c0a36573474086f38f29e06cd2e321963e34482b44b9353fb96dc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / mdshelf-0.1.0-py3-none-any.whl

Download URL mdshelf-0.1.0-py3-none-any.whl
Size 1.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
2eca4ba50a3113062325247329c3d2a1b09b3d56bb458ef04057e3d48bcb9ce6
BLAKE2b-256 checksum
How to use checksums
038c5c8e99fcf743900649cc092644414b5a16024127a28006016ee6b473cf74
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Security for mdshelf 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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