#Introducing `tyler`: A Tool for easy package publishing

1 messages · Page 1 of 1 (latest)

coral ledge
#

tyler is a JavaScript tool that can make the life a lot easier when developing packages (libraries and templates), without the cumbersome editing and copy-pasting, manual folder mangement, etc. I developed it in three days so it is still immature, but I have (not exactly but) succesufully published my new package.

It has the following features now:

  • 📥 Install package locally to be able to use with @local/somepkg:0.1.0
  • 📄 Compile relative entrypoint import (e.g. ../lib.typ) to preview import (e.g. @preview/somepkg:0.1.0)
  • 🔄 Bump the version of the package interactively or with specified semver as CLI argument
  • 📦 Package the library or package into typst/packages ready for publishing
  • 🔍 Check if the package manifest (typst.toml) is valid before publishing
  • 🚀 Semi-automatic publishing that creates a PR to the Typst preview package repository

The next planned features include PR template prompting and better publishing workflow. I'm also planning on to improve the process more by receiving feedback from package maintainers like you! Welcome to contribute by commenting.

You can see the repository down here:
https://github.com/mkpoli/tyler

You can try it now by:

bun i -g @mkpoli/tyler
tyler build -i -p
GitHub

Typst package (libraries, templates) publishing utilty CLI tool - mkpoli/tyler

coral ledge
acoustic moss
#

cool! where does the name come from?

leaden basin
#

I'd say probably something like "Typst butler"

coral ledge
earnest shard
#

oh that looks very useful!

#

though i must ask, why did you choose javascript?

#

isn't the typst ecosystem more rust-ey?

coral ledge
# earnest shard though i must ask, why did you choose javascript?

Yeah, I’m also thinking about that 🙂

Actually as I stated in the release note in Japanese, translated to English as: (TL;DR: SKILL ISSUE 🥲)

The reason I developed with JavaScript (TypeScript) + Bun is that Python is too heavy, and the CLI culture is most developed in the web domain, so all the necessary development tools are readily available. I actually wanted to develop in Rust, but I thought it would never finish if I developed in Rust, so I decided to develop in JS for now, simplify the experimental package development process, and ultimately hope that the official team will write the official workflow in Rust.

earnest shard
#

ahh i see

coral ledge
#

So basically it’s more like a useable experiment using JS for fast prototyping

earnest shard
#

honestly, for scripts that take a couple seconds to a minute to run, python is fine too

#

it's not much better than JS, but it's at least a bit better

coral ledge
#

I will really happy if someone can improve or rebuild it in a faster and more reliable language

earnest shard
#

how about something like C# ?

#

it's fast, not too different from JS, and has good CLI tooling and libraries

#

and not as difficult as rust

coral ledge
earnest shard
#

interesting

#

i've made some python CLI tools myself, a couple years ago
they worked fine

#

plenty fast, too

coral ledge
#

Yeah, I’m also a heavy Python user, so I understand it

#

Until 2024 when uv comes around, there is no established well-designed feature-rich and fast (Rust based) package manager that supports global virtual environment and Python version management etc.

Although program to this complexity will probably just work fine

#

Another thing that affects my choice, is that the CLI tooling is so mature and people have almost perfected the usage, especially interactive prompting

Python did also have this but using a port of JS package

#

Also in Tyler I used prettier and its plugin to format TOML well

As far as I am aware there is no such thing around outside js ecosystem (except for the languages themselves

earnest shard
#

this seems pretty good

shadow turret
#

It is not related to the repository, but what is your vscode them I love it ! @coral ledge