A cross-platform terminal-based markdown renderer for .NET 9.
Renders markdown with full ANSI formatting — bold, italic, colors, syntax-highlighted code blocks, tables, and more — adapted to your terminal width. Includes an interactive pager with vim-style navigation and multiple color schemes.
- Headings — color-coded by level
- Bold / Italic — native terminal formatting
- Code blocks — bordered panels with language label and keyword highlighting (C#, JS/TS, Python, Rust, Go)
- Inline code — distinct background
- Tables — full-width with rounded borders
- Lists — ordered, unordered, nested
- Blockquotes — vertical bar + italic
- Links — underlined with URL displayed
- Horizontal rules
- Interactive pager — scrollable output with status bar
- Color schemes — cycle through Monokai, Dracula, Nord, GitHub Dark, Solarized, Catppuccin
winget install michaelsanford.mdrRequires .NET 9 SDK.
dotnet build -c ReleaseOr publish a self-contained binary for your platform:
dotnet publish -c Release -r linux-x64 --self-contained
dotnet publish -c Release -r osx-arm64 --self-contained
dotnet publish -c Release -r win-x64 --self-contained# Render a file
mdr README.md
# Pipe from stdin (bash)
cat README.md | mdr -
# Pipe from stdin (PowerShell)
Get-Content README.md | mdr -When output exceeds the terminal height, mdr enters an interactive pager. If output is piped or fits on screen, it prints directly.
| Key | Action |
|---|---|
| ↑ / k | Scroll up |
| ↓ / j | Scroll down |
| PgUp / b | Page up |
| PgDn / Space | Page down |
| Home / g | Jump to top |
| End / G | Jump to bottom |
| t | Cycle color scheme |
| q / Esc | Quit |
Press t to cycle through:
- Monokai — warm pinks, yellows, greens
- Dracula — purples, pinks, cyans
- Nord — cool blues, teals
- GitHub Dark — blues, oranges, greens
- Solarized — classic amber, teal
- Catppuccin — soft pastels
- Markdig — markdown parsing
- Spectre.Console — terminal capability detection
MIT