How to sync a local git folder to typst.app?

I know integration with gitlab and github exists.

However, what should I do when I version control my document on a private company managed gitlab instance (I don’t have admin rights on the instance). I’d like to collaborate with some less-technical co-workers on a document using typst.app.

  • Is there any way to push a local git folder to a typs app project?
  • Is there any API I can use to upload files to a typst app project?

Because now, my only option seems to be to upload my local folder manually to typst app by clicking the File > Upload file > Pick a folder. And if others contribute, download the folder again and resolve changes locally, then upload again.

If there was any form of API based access to manage projects files on a typst app project, I could easily set-up a little bash script to fetch the current project state on typst app, stage the changes in a new local branch, and re-upload the resolved changes back to the app. Or something along those lines.

Any feedback is appreciated!

1 Like

The cloud app can only sync to the main public GitLab and GitHub instances. Syncing with a custom GitLab instance is possible in a Typst On-Premises installation. If this might be interesting for your company, please reach out to us via the contact form on Typst: Pricing!

There isn’t currently an API, but note that even if it existed, such an API wouldn’t necessarily take care of merging your local changes with live-collaborative remote changes. This is something the Git integration just takes care of.

I doubt I have enough leverage in my institution to get anywhere close to making them install and pay for an on-prem typst server. I am trying to spread the word though, I think typst is great! So perhaps in a few years when all my coworker start using typst too :smile:

On the other hand, I wonder if it isn’t possible to setup generalized git integration with any git-hosting system (gitlab/github/bitbucket/codeberg). They follow the same protocol (git), so any system that allows setting a remote URL and perhaps upload a ssh key or API key would do. My local git cli doesn’t know and doesn’t care what git hosting server (gitlab/bitbucket/etc) it is pushing/pulling from but it works with all of them without case-by-case configuration.

Also, forgive me if I come off arrogant, and sorry for being of topic, but…
I see you’re one of the core typst developers, you’re doing awesome work! Thanks for making typst!

A generalized ssh-based integration would be nice (it’s blocked on ssh support in the node.js git library we are using), but regardless direct OAuth integration with GitHub and GitLab has value as it’s much easier to set up for a user (at least those less familiar with ssh keys). Also, a company git hosting system might not always be available on the public internet, in that case it can fundamentally only work in Typst On-Premises. When communicating with arbitrary remotes from our backend, we’d also need to carefully consider security.

PS: No worries, you do not come off as arrogant. Thanks for the kind words. :)

1 Like