Skip to content

Markdown renderer, editor, and linter for the terminal

License

Notifications You must be signed in to change notification settings

tirthpatell/mdr

Repository files navigation

mdr

Go Report Card Go Reference License: MIT Release codecov

Markdown renderer, editor, and linter for the terminal.

mdr demo

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

Packages

No packages published

Languages