So you want to write a Typst package. You’ve heard about the typst-community-template. It works. It’s fine. It’s the beige wall of package templates, inoffensive, forgettable, but always slightly too much effort to set up.
Enter my copier template. You answer a handful of questions, it spits out a fully structured Typst package, and you get on with the actually interesting part. Here’s why you should consider using that in the future:
Interactive setup. Answer a few prompts, get a ready-to-go package. No manual find-and-replace like a medieval scribe.
Opinionated. Sensible defaults and a clean structure out of the box.
Future-proof. Copier lets you pull updates from the template into your existing project — so when the template improves, you’re not left behind.
Now, the quirk. The template is opinionated and integrates with gotpm, a Typst package manager I wrote, which is used by approximately one person… me.
You can replace it entirely with a package manager of your choice. I am even considering of letting the user of the template decide which package manager to use in future iteration. You want something changed? Just leave a Pull request or open an Issue. If you like it consider leaving a star on GitHub — no pressure. (Some pressure.)
Haha fair enough… When I used the community template for the first time it took me a very long time to figure out the all the dependencies.
For a template you will any way need:
typst
typstyle for the formatting
tytanic for some testing
typst-package-check to check for common errors in packages
I added two binaries that can be installed with curl. uvx to unlock pre-commit hooks and automatic Changelog creation. And the package manager to move packages into {data-dir}/typst/packages/<namespace>/<name>/<version> in an editable manor. And both of those are self updatable.
You can still opt out of any of those tools though.
Edit: I forgot the just task runner, which can also neatly be installed with uv
Yes but only once in the beginning. It’s currently only a handful of Questions, and the answers get injected into many different places of the template. While rendering the template kebabcase can be enforced and used.
This should for example make the setup of the Github Actions for complete newcomers much simpler.