MEREAD

Locally preview how GitHub will render your Markdown files.

release-badge WTFPL Version info

MEREAD is a command-line tool for previewing Markdown files as they will be presented on GitHub, all completely locally and offline.

Motivation

I was surprised to find no simple tool that would allow me to preview Markdown files as they would be rendered on GitHub.

I wanted a tool that is:

There are other tools that get the job done, better or worse, but they all have some drawbacks that I wanted to avoid:

Tool Written in Biggest drawback
grip Python Uses GitHub's markdown API to render Markdown files, causing unnecessary usage of web requests.
gh markdown-preview Go Is meant to be used as extension in gh, GitHub's CLI.
markdown-preview.nvim Typescript Requires Neovim.

Usage

preview github flavored markdown locally

Usage: meread [OPTIONS] [PATH]

Arguments:
  [PATH]  Path to markdown file or directory containing README.md [default: .]

Options:
  -e, --export-dir <EXPORT_DIR>  If supplied, will export the markdown file to HTML in the specified
                                 directory
  -f, --force                    Whether to overwrite the export directory if it exists
  -a, --address <ADDRESS>        Address to bind the server to [default: localhost:3000]
  -o, --open                     Whether to open the browser on serve
  -l, --light-mode               Render page in light-mode style
      --generate-manpage         Print manpage to stdout and exit
  -h, --help                     Print help
  -V, --version                  Print version

Installation

From prebuilt binaries

For each version, prebuilt binaries are automatically built for Linux, MacOS and Windows.

From source

Manpages

Can be installed by

mkdir -p ~/.local/share/man/man1/
meread --generate-manpage > ~/.local/share/man/man1/meread.1