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).
Everything renders on your machine. Fonts, themes and grammars are bundled, and nothing is uploaded.
Syntax highlighting uses my own highlighter, https://github.com/ozanvos/pierre-highlights-rs, with Giallo (https://crates.io/crates/giallo) covering the remaining languages.
macOS and Linux app: live preview, line highlights, custom fonts, copy to clipboard.
CLI: reads a file or stdin and writes PNG, SVG or HTML. It can also capture terminal output:
cargo test --color=always | monoprint -l ansi -o test.png You can also use it as a Rust library, and from Node.js through prebuilt bindings on npm.Free and open source (Apache-2.0).
Building the app in GPUI was a pleasure: fast, crisp text and precise layout. Feedback on the output and the themes is very welcome.
Comments URL: https://news.ycombinator.com/item?id=50440754
Points: 1
# Comments: 0

