Skip to main content
terminal · markdown · pager

mdcat

Render Markdown beautifully in your terminal.
Full colour, syntax highlighting, search, and mouse — zero config.

$npm i -g @dunkinfrunkin/mdcat
or
$brew install dunkinfrunkin/tap/mdcat
mdcat README.md
$

Everything you need

All GitHub-Flavoured Markdown rendered with care. Nothing to configure.

Light & dark themes

Auto-detects your terminal background. One Dark for dark terminals, One Light for light ones. Override with --light or --dark.

mdcat README.md          # auto
mdcat --light README.md  # force
MDCAT_THEME=dark mdcat …
Incremental search

Press / to search. Matches highlight live with gold gutter markers. n / N to cycle.

Press /  to enter search
Type to filter in real time
n / N  to jump between hits
Keyboard-driven

Familiar vi-style bindings. j/k, space/b, g/G — zero learning curve if you know less.

j / k     scroll line
space / b  page down/up
g / G     top / bottom
Mouse wheel

Scroll naturally with your mouse wheel. Three lines per tick using SGR mouse mode.

Scroll ↑   offset -= 3
Scroll ↓   offset += 3
Clickable links

OSC 8 hyperlinks work in iTerm2, Kitty, WezTerm, foot, and Ghostty.

[link text](https://example.com)
→ blue underline, clickable
Plain text output

Use -p / --plain to strip all ANSI styling and skip the TUI. Perfect for piping to grep, pbcopy, or other tools.

mdcat -p README.md | grep install
mdcat --plain NOTES.md | pbcopy
Git diff gutter

See which lines changed at a glance. Green + for added, yellow ~ for modified, red - for deleted. Works automatically in git repos.

+ added line
~ modified line
- deleted line
Zero config

No config files, no env vars, no setup. Pipe or open — it just works.

npx @dunkinfrunkin/mdcat file.md
curl … | npx @dunkinfrunkin/mdcat
$

Open in your browser

Prefer a browser? Use the --web flag to render your Markdown as a styled HTML page and open it instantly.

$mdcat --web README.md
localhost:3000/README.md
mdcat /\(o.o)/\

npmMITnode ≥18

Terminal pager for Markdown. Full colour, syntax highlighting, incremental search, mouse support — zero config.

npm install -g @dunkinfrunkin/mdcat
Install
# npm npm install -g @dunkinfrunkin/mdcat # Homebrew brew install dunkinfrunkin/tap/mdcat
Usage
mdcat README.md # open a file mdcat --web README.md # render & open in browser
$

Keyboard shortcuts

vi-style bindings. Familiar if you know less or vim.

q
Quit
y
Copy visible page to clipboard
L
Toggle line numbers
M
Toggle mouse (off = free text selection)
j / k
Scroll down / up one line
/
Scroll up / down one line
Space / b
Page down / page up
d / u
Half-page down / up
g / G
Jump to top / bottom
/
Enter search mode
n / N
Next / previous match
Esc
Cancel search or clear matches
Mouse wheel
Scroll up / down three lines

Try it right now

No install required. Just paste this into your terminal.

$npm i -g @dunkinfrunkin/mdcat
or
$brew install dunkinfrunkin/tap/mdcat