mdr
Markdown renderer, editor, and linter for the terminal.
Install
Homebrew
brew install tirthpatell/tap/mdr
Go
go install github.com/tirthpatell/mdr@latest
GitHub Releases
Download binaries from the releases page.
Usage
View
Render a markdown file in a scrollable TUI:
mdr view README.md
Pipe from stdin:
cat README.md | mdr view
Print rendered output without TUI:
mdr view --raw README.md
Edit
Open the TUI editor with live preview:
mdr edit README.md
Editor keys: Arrow keys to move, type to edit, Ctrl+S to save, Ctrl+C to quit.
Lint
Check markdown files for structural issues:
mdr lint README.md docs/*.md
Rules:
heading-hierarchy - Heading levels should not skip (e.g., H1 to H3)
duplicate-heading - Headings at the same level should not repeat
empty-link - Links must have a destination
License
MIT