Terminal Markdown viewer and reader built with Bubble Tea, Lipgloss, and Glamour.
Features visual styling inspired by mdpreview, including GitHub Alerts ([!NOTE], [!TIP], [!IMPORTANT], [!WARNING], [!CAUTION]), syntax highlighting, table borders, adaptive terminal theming, and an interactive exit dialog.
- Full-screen terminal user interface (TUI)
- Reads Markdown files directly or piped via standard input (stdin)
- Mouse wheel and keyboard scrolling support (arrows, Vim keys
j/k,PageUp/PageDown,Home/End) - Vertical progress scrollbar on the right edge
- Informative status bar displaying document title, scroll percentage, line count, and shortcuts
- Exit confirmation dialog triggered via
Ctrl+Qwith interactive[ No ]and[ Yes ]options (defaults to[ Yes ]) - Automatic dark/light background detection based on the user's terminal profile
- Custom GitHub alert rendering matching
mdpreviewcolor specifications
go build -o bin/mdpreview-cli ./cmd/mdpreview-cliOptionally install into your $GOPATH/bin:
go install ./cmd/mdpreview-cliPreview all supported Markdown features and modern GitHub alert callouts using the included showcase file:
# Preview via file argument
./bin/mdpreview-cli examples/showcase.md
# Or pipe via stdin
cat examples/showcase.md | ./bin/mdpreview-climdpreview-cli README.mdcat file.md | mdpreview-cliOr piping output from any command:
curl -s https://raw.githubusercontent.com/charmbracelet/bubbletea/master/README.md | mdpreview-climdpreview-cli --help
mdpreview-cli --version| Action | Shortcuts |
|---|---|
| Scroll Down | ↓, j, Mouse Wheel Down |
| Scroll Up | ↑, k, Mouse Wheel Up |
| Page Down | PageDown, f, Ctrl+D (half page) |
| Page Up | PageUp, b, Ctrl+U (half page) |
| Jump to Top | Home, g |
| Jump to Bottom | End, G |
| Exit Dialog | Ctrl+Q, q |
| Dialog Navigation | ← / →, Tab / Shift+Tab, h / l |
| Confirm Dialog | Enter (executes selected button), y |
| Cancel Dialog | Esc, n |
| Force Quit | Ctrl+C |
go test ./...