LinuxCommandLibrary

mdcat

Display Markdown files with rendered formatting

SYNOPSIS

mdcat [options] [file ...]

PARAMETERS

-h, --help
    Show help message and exit.

-V, --version
    Show program's version number and exit.

-c, --no-color
    Disable colored output.

-l, --language
    Manually set the language for syntax highlighting.

-t, --term
    Manually set the terminal type for true color.

-r, --recursive
    Read all files under each directory, recursively.

-o, --output
    Write output to instead of stdout.

--theme
    Use specific theme to highlight the code. Use --list-themes to list possible values.

--list-themes
    Show available themes.

DESCRIPTION

mdcat is a command-line utility that acts as a `cat` replacement with markdown highlighting, meaning it reads files and outputs their content to the standard output but it processes markdown files to render them in a visually appealing way with syntax highlighting. It's particularly useful for displaying markdown files, READMEs, and other text-based documents with improved readability in the terminal.
It leverages terminal emulators capabilities to display 24-bit colors.
By default, mdcat will use standard input if no filename is given.

CAVEATS

The quality of syntax highlighting depends on the file's format and the availability of a corresponding syntax highlighter. May not render all markdown features perfectly in every terminal.

USAGE EXAMPLES

mdcat README.md: Display the README file with syntax highlighting.
mdcat -c file.txt: Display file.txt without color.
mdcat -r directory/: Recursively display all markdown files within directory/.
mdcat --theme SolarizedDark README.md: Display README.md with SolarizedDark theme.

SEE ALSO

cat(1), less(1), head(1), tail(1)

Copied to clipboard