A beautiful macOS markdown renderer with Mermaid and Graphviz support.
- Native macOS window with WebKit rendering
- Automatic dark/light mode support
- Live file watching with
--watchflag - Syntax highlighting for code blocks
Here's some Swift code:
func greet(name: String) -> String {
return "Hello, \(name)!"
}
let message = greet(name: "World")
print(message)flowchart TD
A[Start] --> B{Is it working?}
B -->|Yes| C[Great!]
B -->|No| D[Debug]
D --> B
C --> E[End]
sequenceDiagram
participant User
participant CLI
participant Window
participant WebView
User->>CLI: Run command
CLI->>Window: Create window
Window->>WebView: Load HTML
WebView-->>User: Display rendered markdown
digraph G {
rankdir=LR;
node [shape=box, style=rounded];
Markdown -> Parser -> HTML -> WebView -> Display;
}digraph components {
node [shape=component, style=filled, fillcolor=lightblue];
subgraph cluster_app {
label="Application";
CLI [label="CLI\nEntry Point"];
AppDelegate [label="App\nDelegate"];
Window [label="NS\nWindow"];
}
subgraph cluster_render {
label="Rendering";
Parser [label="Markdown\nParser"];
Generator [label="HTML\nGenerator"];
WebView [label="WK\nWebView"];
}
CLI -> AppDelegate -> Window;
Window -> WebView;
Parser -> Generator -> WebView;
}
| Feature | Status | Notes |
|---|---|---|
| Markdown | ✅ | Full CommonMark support |
| Mermaid | ✅ | Flowcharts, sequences, etc. |
| Graphviz | ✅ | DOT language support |
| Dark Mode | ✅ | Follows system preference |
"The best way to predict the future is to invent it." — Alan Kay
- Create CLI entry point
- Set up NSWindow
- Implement markdown parsing
- Add Mermaid support
- Add Graphviz support
- Add PDF export
- Add print support
Built with Swift, AppKit, and WebKit