Skip to content

typst-community/utpm

Repository files navigation

UTPM logo

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.

typst-community - utpm stars - utpm forks - utpm
GitHub tag License issues - utpm

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
  • 🛠️ 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)
  • 📦 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)
  • 🔎 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)
  • 📤 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.

$ cargo install --git https://github.com/typst-community/utpm

Or

$ cargo install utpm

With nix

Nix with flakes enabled:

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
        }
      ];
    };
  };
}

Nix without flakes:

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

🎰 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

About

A package manager for local and remote Typst packages.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 7

Languages