mdv

command module
v0.0.0-...-99915cb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 20 Imported by: 0

README

mdv

A super simple, very nice Markdown viewer. One command, and your Markdown file opens in the browser as a beautifully styled, readable page.

mdv notes.md

Features

  • One-line commandmdv <file.md> opens the rendered page in your default browser
  • Beautiful typography — comfortable measure, careful spacing, system fonts
  • Dark mode — automatically follows your OS appearance
  • Syntax highlighting — fenced code blocks colored via chroma
  • Live reload — save the file and the page updates instantly (scroll position preserved)
  • GFM support — tables, task lists, strikethrough, autolinks
  • Heading anchors — hover any heading to grab a #fragment link
  • Local images — relative image paths in your Markdown just work
  • Print-friendly⌘P gives you a clean printable/PDF version

Install

go install github.com/mcls/mdv@latest

Or build from source:

go build -o mdv .

A single static binary — no runtime, no node_modules.

Usage

mdv README.md              # open in browser, live-reload on save
mdv README.md --no-open    # start the server, don't open a browser
mdv README.md --port 8080  # pin a port (default: first free from 5173)

Stop with Ctrl+C.

How it works

mdv starts a tiny local HTTP server (bound to 127.0.0.1 only), renders the Markdown with goldmark + chroma, and opens the page. A file watcher pushes a server-sent event on every save, and the page swaps in the fresh content without losing your scroll position.

No build step, no config, one binary.

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL