mdcat(1)
mdcat renders Markdown files in the terminal with syntax highlighting and formatting.
Synopsis
mdcat [OPTION]... [FILE]...Description
mdcat is a terminal Markdown viewer that displays Markdown files with proper syntax highlighting, colors, and formatting. It supports CommonMark and GitHub Flavored Markdown, making documentation readable directly in the terminal without converting to HTML or PDF first.
mdcat automatically detects terminal capabilities and adjusts output accordingly, supporting 24-bit true color, hyperlinks, and inline images where available. It can paginate long documents and respects terminal width for proper text wrapping.
Common options
| Flag | What it does |
|---|---|
-p, --paginate | paginate output if it exceeds terminal height (use pager) |
-c, --no-color | disable colored output, use plain text |
--columns NUM | set column width for output (default: terminal width) |
-i, --dump-headers | dump document structure showing headers |
--no-hyperlinks | disable terminal hyperlink escape sequences |
-h, --help | show help message and exit |
-V, --version | display version information |
Examples
display README.md with syntax highlighting in the terminal
mdcat README.mdview a long manual file with pagination through less or more
mdcat -p MANUAL.mdrender Markdown without color for plain text output
mdcat -c DOCUMENT.mdformat output to 80 columns regardless of terminal width
mdcat --columns 80 file.mdpipe Markdown content from stdin to mdcat
cat file.md | mdcatdisplay multiple Markdown files sequentially with formatting
mdcat *.md