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!
π₯ Features
- β¨ 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!
β‘Install
With cargo
Requires Cargo and Rust.
Or
With nix
Nix with flakes enabled:
Get utpm for a bash session without installing it:
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
}
];
};
};
}
Nix without flakes:
Clone the repo and then nix-build into the utpm directory:
Utpm will be at ./result/bin/utpm
π° Usage
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
Workspace (ws
): Manage Your Project Workspace
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. |
Packages (pkg
): Manage Typst 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. |
generate (gen
): Generate Shell Completions
β€οΈ Contribution
If you want to help me develop this package, simply make an issue or a PR!
By using this app, you contribute to it, thank you! <3