Typst Preview: a macOS Quick Look extension for .typ files

Hi everyone,I built a small macOS tool called Typst Preview that lets me preview .typ files directly in Finder using Quick Look.

Why I made it

I wanted a more native macOS workflow for quickly checking Typst documents without opening an editor first, and Quick Look felt like the most natural place for that.

How it works

The project has two parts:

  1. a Quick Look extension that tries to compile the selected .typ file
  2. a host app that handles package downloads and shared cache management

If a document depends on packages that are not installed yet, the extension requests them, the host app downloads them, and Quick Look can render the document after retrying.

Current limitations

There are still some important limitations:

  • Documents that import external assets such as images will fail to compile, because maybe the macOS Quick Look sandbox does not currently allow the extension to access everything a normal Typst workflow can access.
  • Math mode is not working correctly yet. I am still investigating and fixing this part.
  • The first preview of a package-heavy document may require one extra retry after dependencies are downloaded.

Current state

Despite those limitations, the tool is already usable for my local workflow and can handle package-based documents in many cases.

Source code

GitHub: GitHub - WangHaoZhengMing/typst_preview: A macOS Quick Look extension for Typst files, integrating the Rust compiler via C bindings for high-performance previewing. · GitHub

If you use macOS and work with Typst regularly, I’d be very interested in feedback, especially on the Quick Look workflow and the package-handling behavior.


6 Likes

Hi,

I would be really interested in this, but…

As an 80-year-old ex humanities lecturer, with no coding experience other than what I have managed to learn using Typst, I am totally befuddled when I check your GitHub page. Building the previewer as stated is beyond my ability, so I would like to ask if you have any plans to release a prebuilt, installable version of it in either DMG or Zip format?

Many thanks.
Mark

1 Like

Hi, very happy that u are interested in it. But I am a little bit busy these days, maybe(maybe :mask:) I can release a beta version in the end of this month.

But everything needs to be tested, I have to optimize the speed of this app.And I am applying for apple developer account so that I can publish this app to Mac App Store. I may also add some features.


多谢你的回答!

I fully understand that you must be busy, and it’s not a matter of urgency for me. So when you have it sorted to the point where you can compile it and make it available for others to test, I’ll be happy to do so.

I wish you success, both with this, and with registration as an Apple developer.

:slight_smile:
Mark