MarsDawn

Markdown to PDF, from the command line.

The free marsdawn tool turns a Markdown file into a PDF with one command. Tables, math, Mermaid diagrams and highlighted code come out the way they read in the source, and it needs nothing else installed, not even the MarsDawn app.

Install it

brew install redtear1115/tap/marsdawn
marsdawn --version

On an Apple silicon Mac, Homebrew installs a prebuilt copy in seconds. On an Intel Mac it builds from source instead, which takes a few minutes and needs Xcode 26 or later. It runs on macOS 15 or later, and marsdawn --version prints the version you got.

Save a document

Paste this into a file named plan.md:

# Plan: faster exports

An agent wrote this plan. You review it, then turn it into a PDF.

## Steps

| Step | Owner | Status |
|------|-------|--------|
| Measure the slow pages | Agent | Done |
| Cache rendered diagrams | Agent | In review |

The target is $t < 2\,\text{s}$ for a 50-page document:

$$
t_{\text{total}} = \sum_{i=1}^{n} t_i
$$

```mermaid
graph LR
  Draft --> Review --> Ship
```

```swift
let pdf = try export("plan.md")
```

Export it

marsdawn export plan.md

It writes plan.pdf next to the source and prints where it went:

Exported /Users/you/plan.pdf (1 page)

This is that page, captured from a real run of marsdawn 0.5.0:

The exported PDF: the heading, a table of steps, an inline and a displayed formula, a Draft, Review, Ship diagram, and a highlighted line of Swift.

If it doesn't work

Next