Monoprint
Monoprint is a Rust tool for generating code screenshot images, provided as a GPUI desktop app for macOS and Linux (live preview, line highlights, custom fonts, copy to clipboard), a CLI that reads a file or stdin and writes PNG, SVG or HTML (including terminal output capture), a Rust library, and Node.js prebuilt bindings on npm. All rendering happens locally with bundled fonts, themes and grammars; it is free and open source under Apache-2.0.
Shared over time
Each entry reflects what was shared on that date. Details may have changed since then.
Monoprint
Monoprint is a Rust tool for generating code screenshot images, provided as a GPUI desktop app for macOS and Linux (live preview, line highlights, custom fonts, copy to clipboard), a CLI that reads a file or stdin and writes PNG, SVG or HTML (including terminal output capture), a Rust library, and Node.js prebuilt bindings on npm. All rendering happens locally with bundled fonts, themes and grammars; it is free and open source under Apache-2.0.
Posted by @osener · Original source ↗
Story title · @osener · · Source ↗
Show HN: Monoprint – Beautiful code images, GPUI desktop app, CLI, Rust library
Submitted URL · @osener · · Source ↗
https://github.com/ozanvos/monoprint
Source text · @osener · · Source ↗
I built Monoprint in Rust as a CLI tool for generating code screenshots for an in-house programming language. I liked it so much that I ended up building a desktop app around it with GPUI (Zed's UI framework).
Source text · @osener · · Source ↗
Everything renders on your machine. Fonts, themes and grammars are bundled, and nothing is uploaded.
Source text · @osener · · Source ↗
Syntax highlighting uses my own highlighter, https://github.com/ozanvos/pierre-highlights-rs, with Giallo (https://crates.io/crates/giallo) covering the remaining languages.
Source text · @osener · · Source ↗
macOS and Linux app: live preview, line highlights, custom fonts, copy to clipboard.
Source text · @osener · · Source ↗
CLI: reads a file or stdin and writes PNG, SVG or HTML. It can also capture terminal output:
Source text · @osener · · Source ↗
You can also use it as a Rust library, and from Node.js through prebuilt bindings on npm.
Source text · @osener · · Source ↗
Free and open source (Apache-2.0).