A portable, zero-dependency CLI tool that renders Markdown files in a browser window with live reload.
mdview file.md # Open a single file
mdview file1.md file2.md # Concatenate and view multiple files
cat file.md | mdview # Read from stdin- Live reload — File watcher + SSE pushes reload events to the browser
- GitHub-flavored Markdown — Tables, task lists, strikethrough, autolinks
- Syntax highlighting — Fenced code blocks with language detection
- Dark/light mode — Respects
prefers-color-scheme, with a toggle button - Clean typography — GitHub-like CSS embedded in binary
- Portable — Single binary, cross-compile for macOS/Linux/Windows
- Reads the Markdown file(s)
- Converts to HTML using goldmark with GFM extensions
- Starts a local HTTP server on a random port
- Opens the default browser
- Watches the source file for changes and auto-reloads via SSE
- Exits when the browser tab closes or on Ctrl+C
go build -o mdview .Here's a table:
| Feature | Status |
|---|---|
| Tables | ✅ |
| Task lists | ✅ |
| Code highlighting | ✅ |
| Dark mode | ✅ |
| Live reload | ✅ |
And a task list:
- Parse Markdown
- Render HTML
- Live reload
- World domination
package main
import "fmt"
func main() {
fmt.Println("Hello from mdview!")
}This is a blockquote to test styling.
Built with Go and goldmark.