LinuxCommandLibrary

mdcat

Cat for Markdown with terminal rendering

TLDR

Render a Markdown file
$ mdcat [path/to/file.md]
copy
Render Markdown from stdin
$ echo "# Hello" | mdcat
copy
Paginate output
$ mdcat -p [path/to/file.md]
copy

SYNOPSIS

mdcat [options] [files...]

DESCRIPTION

mdcat renders Markdown documents directly in the terminal with syntax highlighting for code blocks (via syntect), inline images in supported terminals, clickable links, and jump marks for headings in iTerm2.
It works best with iTerm2, WezTerm, and kitty, and supports most modern terminal emulators including Windows Terminal and anything based on VTE. If no files are specified, it reads from stdin.

PARAMETERS

-p, --paginate

Paginate output through a pager.
--no-colour
Disable syntax highlighting and colours.

CAVEATS

Inline image support depends on the terminal emulator. Some terminals may only display links to images instead.

HISTORY

mdcat was created by swsnr and is written in Rust.

SEE ALSO

glow(1), bat(1), mandown(1), cat(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard