Unofficial Typst package manager
UTPM is a package manager for local and remote Typst packages. Quickly create and manage projects and templates on your system, and publish them directly to Typst Universe.
Warning
UTPM is still in active development, and some features may not be fully implemented.
We are searching for contributors — anything you can offer will be greatly appreciated!
- ✨ Create and initialize packages rapidly (
utpm workspace init
)- ⏯️ Alias shorthands (e.g.,
workspace
->ws
,packages
->pkg
) - ⌨️ Intuitive Clap CLI
- ⏯️ Alias shorthands (e.g.,
- 🛠️ Manage project dependencies
- ➕ Add dependencies (
utpm ws add
) - ➖ Remove dependencies (
utpm ws delete
) - 🔄 Sync dependencies to the latest versions (
utpm ws sync
) - 📦 Install dependencies from
typst.toml
(utpm ws install
)
- ➕ Add dependencies (
- 📦 Manage local and remote packages
- 📥 Clone packages from the Typst Universe (
utpm ws clone
) - 🔗 Link local packages for development (
utpm ws link
) - 🗑️ Unlink and bulk-delete packages (
utpm pkg unlink
,utpm pkg bulk-delete
) - ⬆️ Bump package version (
utpm ws bump
)
- 📥 Clone packages from the Typst Universe (
- 🔎 Discover and inspect packages
- 🗃️ List local packages (
utpm pkg list
) - 🌲 Tree view for packages (
utpm pkg list --tree
) - ℹ️ Get package information from the remote (
utpm pkg get
) - ✅ Check for new package versions without updating (
utpm ws sync -c
)
- 🗃️ List local packages (
- 📤 Flexible output formats
- 📝 Classic text and JSON output (fully supported)
-
⚠️ YAML, HJSON, and TOML output (experimental, under active development, and not included in official utpm builds — requires manual build for access)
- 🚀 Automated publication directly to Typst Universe!
...And more soon!
Requires Cargo and Rust.
$ cargo install --git https://github.com/typst-community/utpm
Or
$ cargo install utpm
Get utpm for a bash session without installing it:
$ nix shell github:typst-community/utpm
Or if you use NixOS or home-manager with a flake, install it permanently in your flake.nix
or your modules:
{
inputs.utpm.url = "github:typst-community/utpm";
# ...
outputs = { self, nixpkgs, ... }@inputs: {
# change `yourhostname` or `yourusername` to your actual hostname or username
nixosConfigurations.yourhostname = nixpkgs.lib.nixosSystem { #or homeConfigurations.yourusername
system = "x86_64-linux";
modules = [
# ...
{
environment.systemPackages = [ inputs.utpm.packages.${system}.default ]; #or home.packages
}
];
};
};
}
Clone the repo and then nix-build into the utpm directory:
git clone https://github.com/typst-community/utpm.git
cd utpm
nix-build
./result/bin/utpm
Utpm will be at ./result/bin/utpm
Further usage information can be found by running utpm --help
or utpm <command> --help
on any of the sub commands. Documentation is still in progress, feel free to ask questions in the issues section. Currently the github documentation is pretty much a mirror of the help command.
Usage: utpm [OPTIONS] <COMMAND>
Commands:
workspace Create, edit, delete your workspace for your package [aliases: ws]
packages use packages related to Typst [aliases: pkg]
generate Generate shell completions [aliases: gen]
help Print this message or the help of the given subcommand(s)
Options:
-v, --verbose <VERBOSE> Gives you more information, permet debug
-h, --help Print help
-V, --version Print version
Command | Alias | Description |
---|---|---|
link |
l |
Link the current project to the local package directory. |
install |
i |
Install all dependencies from the typst.toml manifest. |
add |
a |
Add dependencies to the manifest and then install them. |
delete |
d |
Delete dependencies from the manifest. |
init |
n |
Create a new typst.toml manifest for a project. |
clone |
Clone a package from the typst universe or a local directory. | |
bump |
Bump the version of your package. | |
sync |
Synchronise all your dependencies to their last version. | |
publish |
p |
(WIP) Intended for publishing packages. |
Command | Alias | Description |
---|---|---|
list |
l |
List all packages in your local storage. |
path |
p |
Display the path to the typst packages folder. |
unlink |
u |
Delete a package from your local storage. |
bulk-delete |
bd |
Delete multiple packages or a whole namespace at once. |
get |
g |
Get specific/all package from the remote. |
tree |
t |
[DEPRECATED] Display packages as a tree. Use list --tree instead. |