A terminal Markdown viewer with syntax highlighting, clickable links, and a clean reading experience — built with Bubbletea.
mkd README.md
- Rich Markdown rendering — headings, bold, italic, strikethrough, blockquotes, lists, task lists, and horizontal rules all rendered with proper visual hierarchy
- Syntax highlighted code blocks — fenced code blocks rendered with full syntax highlighting via Chroma, with a sensible default when no language is specified
- Inline code styling —
code spansrendered in a distinct lavender colour with a dark background - Compact tables — tables sized to their content instead of being stretched to fill the terminal width; inline code, bold and links inside cells are fully rendered
- Clickable links — links open in the browser on click using OSC 8 terminal hyperlinks (supported by iTerm2, Kitty, GNOME Terminal, Windows Terminal, and others)
- Scrollable viewport — the entire document fits in a scrollable pane that adapts to any terminal size
- Native mouse selection — click and drag to select and copy any text with your terminal's native copy shortcut
Via brew tap:
brew tap cunhazera/tap
brew install cunhazera/tap/mkdCheck its version
mkd -v (short version for --version)
Requirements: Go 1.21+
git clone https://github.com/gabrielcunha/mkd
cd mkd
go install .The binary is installed to ~/go/bin/mkd. Make sure ~/go/bin is in your PATH:
export PATH="$PATH:$(go env GOPATH)/bin"Or build locally without installing:
go build -o mkd .
./mkd README.mdmkd <file.md>
mkd README.md
mkd ~/notes/todo.md
mkd docs/api-reference.md| Key | Action |
|---|---|
↑ / ↓ |
Scroll one line up / down |
j / k |
Scroll one line down / up (vim-style) |
l / p |
Scroll 15 lines down / up |
f / b |
Scroll one full page down / up |
g |
Go to top |
G |
Go to bottom |
q / esc / ctrl+c |
Quit |
/ |
Search |
| Library | Role |
|---|---|
| Bubbletea | TUI framework and event loop |
| Bubbles | Scrollable viewport component |
| Glamour | Markdown to ANSI renderer |
| Lipgloss | Terminal styling and layout |
| Chroma | Syntax highlighting (via Glamour) |
MIT