mdcat 2.18.871

This package has a SemVer 2.0.0 package version: 2.18.871+69b4e6c269a980ee5d13e4534aa13153408c9c77.
There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global mdcat --version 2.18.871
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local mdcat --version 2.18.871
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=mdcat&version=2.18.871
                    
nuke :add-package mdcat --version 2.18.871
                    

mdcat

A tiny cat for Markdown. Reads a Markdown file (or stdin) and renders it to styled terminal output using Console.Lib's MarkdownRenderer — headings, bold/italic, inline code, lists, blockquotes, fenced code blocks, OSC 8 hyperlinks, and LaTeX math.

Usage

mdcat [options] [file]
Argument Meaning
file Markdown file to render. Use - for stdin. Omit to read redirected stdin, else show help.
Option Meaning
-h, --help Show help.
--mode <encoding> Display-math rendering: unicode | sixel | sextant | halfblock. Default: auto-detect via DA1 (sixel on capable terminals, sextant otherwise).
--color <mode> truecolor | 16 | none. Default: truecolor, or none when NO_COLOR is set.
--no-color, --plain Plain text, no escape sequences. Shorthand for --color none.
--width <N> Render width in columns. Default: console width, or 80.

NO_COLOR (see no-color.org) is honored: any non-empty value disables color unless an explicit --color overrides it.

Examples

mdcat README.md                  # render a file
cat README.md | mdcat -          # render from stdin
mdcat --mode unicode notes.md    # force Unicode math (no raster)
mdcat --plain README.md > out.txt # strip styling for plain capture

Exit codes

Code Meaning
0 Success (also --help).
1 I/O error — file not found or unreadable input.
2 Bad arguments.

Math

Display math rasterizes (sixel / sextant / half-block per --mode) only when the delimiters sit on their own lines — i.e. a block:

$$
\int_0^1 x^2\,dx = \frac{1}{3}
$$

Single-line $$...$$ and inline $...$ always render as single-row Unicode, never rastered.

Rastering needs an OpenType math font. mdcat bundles STIX Two Math (Fonts/STIX2Math.otf, SIL OFL — see Fonts/STIX2-OFL.txt) next to the executable, so math renders the same everywhere without relying on system fonts. If that file is ever missing, MarkdownRenderer falls back to an internal system-font search (STIX Two Math, Cambria Math, …) and, failing that, a Unicode-only approximation.

Install

As a .NET global tool (needs the .NET 10 runtime)

dotnet tool install --global mdcat

Auto-updatable (dotnet tool update -g mdcat) and discoverable via dotnet tool search mdcat. The bundled math font ships inside the package, so display math works out of the box.

Prebuilt native binary (no runtime required)

Download a self-contained binary from the Releases page. Native AOT builds are published for:

OS x64 arm64
Linux linux-x64 linux-arm64
Windows win-x64 win-arm64
macOS osx-x64 osx-arm64

Each archive contains the mdcat executable plus the Fonts/ directory (the bundled math font must sit next to the binary). Extract it and put the folder on your PATH, e.g.:

tar -xzf mdcat-1.0.0-linux-x64.tar.gz
sudo cp -r mdcat-1.0.0-linux-x64/* /usr/local/bin/   # mdcat + Fonts/

Releases are cut by pushing a mdcat-vX.Y.Z tag, which runs .github/workflows/mdcat-release.yml.

Build from source

dotnet build src/MdCat                          # build
dotnet run --project src/MdCat -- README.md     # run in place

# native, self-contained binary for the current platform
dotnet publish src/MdCat -c Release -r <rid> --self-contained -o out
# (rid = linux-x64 | win-x64 | osx-arm64 | …; output in out/, with out/Fonts/)

# or install as a .NET global tool from a local package
dotnet pack src/MdCat -c Release
dotnet tool install --global --add-source src/MdCat/bin/Release mdcat
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
3.6.1121 38 7/7/2026
3.5.1101 34 7/5/2026
3.5.1081 28 7/5/2026
3.5.1061 37 7/4/2026
3.4.1041 32 7/3/2026
3.4.1031 28 7/3/2026
3.3.1021 45 6/20/2026
3.2.1001 39 6/20/2026
3.1.981 41 6/19/2026
3.0.961 34 6/19/2026
2.18.951 38 6/19/2026
2.18.931 39 6/19/2026
2.18.911 36 6/19/2026
2.18.891 34 6/19/2026
2.18.871 36 6/19/2026