#4040·typst

Add support for packages hosted in Git repositories

Author: BattleCh1ckenCreated Apr 30, 2024Updated Sep 29, 2026
Labelsfeature requestpackages

Description

It would be amazing if Typst supported git packages in addition to local and preview packages. This would allow users to download unofficial packages easily without the hassle of needing to use install scripts or the like.

The syntax could look something like this:

typ
#import "@git/battlech1cken/notebookinator:1.0.0"

This would then automatically download the package from that repository and make sure its in the correct directory, automatically excluding the files specified in the typst.toml file.

There are two major problems with this feature that I haven't really thought about yet.

  • git packages obviously can't be reviewed by Typst team, leading to possible security problems.
  • I'm not sure how the web app will handle these types of packages, because I know that network requests there should be kept to a minimum.

Use Case

Currently I maintain a library called The Notebookinator which is rather large. For this reason I doubt it will be accepted as an official package, and I've had to resort to having users install it as a local package. I've included a script which allows for automatic installation, similar to the CeTZ package.

This is less than ideal for my users who now have to go through several steps to download my library, whereas official packages are incredibly easy to acquire.

This problem only gets worse if I need to modify or use unreleased versions of other packages I depend on, users or fellow developers will need to download all of those packages locally as well.