Dot Viewer is a macOS app for working with Graphviz .dot and .gv files. You get a split-pane interface — editor on the left, rendered SVG on the right — with changes reflected in real time as you type.
Install
Download the latest DMG from the Releases page. Drag to Applications and launch. The app is code signed and notarized with Developer ID.
Requires macOS 14.0 or later. Auto-updates via Sparkle.
To build from source:
git clone https://github.com/2389-research/dot-viewer.git
cd dot-viewer
brew install xcodegen bison flex
cd dot-core && git clone --depth 1 --branch 12.2.1 https://gitlab.com/graphviz/graphviz.git graphviz-vendor && cd ..
make
What it does
Live preview. Edits render to SVG with a 300ms debounce. Pick from six Graphviz layout engines — dot, neato, fdp, circo, twopi, sfdp — via the toolbar.
Bidirectional navigation. Click a node in the SVG preview to jump to its definition in the editor. Click a node definition in the editor to highlight it in the preview.
Editor features. Syntax highlighting for DOT keywords, strings, comments, attributes, and arrow operators. Bracket matching, line numbers with current-line highlighting, and standard undo/redo.
Tabbed editing. Open multiple .dot/.gv files as native macOS window tabs. Zoom and pan large graphs in the preview pane.
Error display. An inline error bar shows Graphviz rendering errors as you type, so you catch syntax problems immediately.
How it works
Three layers:
- dot-core (Rust) — Wraps Graphviz’s cgraph and gvc libraries via C FFI. Exposes a clean API through Mozilla’s UniFFI, which auto-generates Swift bindings from the compiled Rust static library.
- UniFFI bridge — Translates between Rust types and Swift types at the boundary.
- DotViewer (SwiftUI) — The app itself: split-pane editor, SVG preview, file handling, tabbed windows.
Graphviz 12.2.1 is compiled from source and linked statically — no system Graphviz installation required.
Requirements
- macOS 14.0+
- For building from source: Xcode 16+, Rust toolchain (
rustup), Homebrew
