Unofficial Typst Package Manager
UTPM is a powerful command-line package manager for Typst. Create, manage, and share Typst packages with ease โ whether for local development or publishing to Typst Universe.
โจ Quick Start
# Install UTPM (see [Installation](#-installation) for all options)
# Create a new package
# Link it for local development
# Use it in Typst!
# #import "@local/my-package:0.1.0": *
[!NOTE] UTPM is actively developed and growing! Some features are still in progress.
Contributions are welcome โ check out our contributing guide!
๐ฅ Why UTPM?
- ๐ Rapid Development - Create and link packages instantly for local testing
- ๐ฆ Smart File Management - Respects
.gitignore,.typstignore, and custom exclude patterns - ๐ Dependency Management - Sync dependencies and bump versions with ease
- ๐ Metadata Extraction - Extract package info for scripts and CI/CD pipelines
- ๐จ Flexible Output - JSON, HJSON, YAML, TOML, or human-readable text
- ๐ก๏ธ Try Features without Risk - Dry-run mode for all destructive operations
- โก Fast & Lightweight - Written in Rust for speed and reliability
๐ฏ Features
Package Development
- โจ Initialize packages with interactive prompts (
utpm prj init) - ๐ Link packages for local development (
utpm prj link) - โฌ๏ธ Bump versions with semantic versioning (
utpm prj bump) - ๐ Extract metadata for automation (
utpm prj metadata)
Dependency Management
- ๐ฅ Clone packages from Typst Universe (
utpm prj clone) - ๐ Sync dependencies to latest versions (
utpm prj sync) - ๐ฆ Install from git repositories (
utpm pkg install)
Package Discovery
- ๐๏ธ List local packages with tree view (
utpm pkg list --tree) - โน๏ธ Get package info from remote (
utpm pkg get) - ๐ Check for updates without applying (
utpm prj sync -c)
Coming Soon
- ๐ Publish directly to Typst Universe (in development)
๐ฆ Installation
Quick Install
Cargo (Cross-platform)
# Using cargo-binstall (fastest)
# Or build from source
Arch Linux
# Using an AUR helper (yay, paru, etc.)
# or
Homebrew (macOS/Linux)
# Coming soon - waiting for tap approval
Nix
With Flakes
Temporary shell:
Permanent installation in flake.nix:
{
inputs.utpm.url = "github:typst-community/utpm";
outputs = { self, nixpkgs, ... }@inputs: {
nixosConfigurations.yourhostname = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [{
environment.systemPackages = [
inputs.utpm.packages.${system}.default
];
}];
};
};
}
Without Flakes
More Package Managers
UTPM is being packaged for multiple package managers:
- ๐ฆ Snap -
sudo snap install utpm(automated publishing) - ๐ฆ Flatpak - Available on Flathub (semi-automated)
- ๐ฆ Debian/Ubuntu -
.debpackages (manual, see docs/PUBLISHING.md) - ๐ฆ Fedora/RHEL - RPM packages (manual, see docs/PUBLISHING.md)
- ๐ฆ Arch/AUR - AUR packages (manual, see docs/PUBLISHING.md)
For maintainers: See docs/PACKAGING.md for technical details and docs/SECRETS.md for automation setup.
Note: Windows builds are generated here but scoop is managed by an another user. See Scoop bucket for typst for more infos.
From Source
๐ Usage
GitHub Actions
Use UTPM in your CI/CD workflows:
- name: Setup UTPM
uses: Thumuss/setup-utpm@v1
See the setup-utpm repository for complete documentation and examples.
Basic Commands
# Create a new package
# Link for local development
# Clone from Typst Universe
# Bump version
# List installed packages
# Get metadata for scripts
VERSION=
Command Overview
Project Management (utpm prj)
| Command | Alias | Description |
|---|---|---|
init |
n |
Create a new typst.toml manifest interactively |
link |
l |
Link package for local development (respects ignore files) |
clone |
c |
Clone a package from Typst Universe |
bump |
b |
Bump package version (supports semantic versioning) |
sync |
s |
Sync dependencies to latest versions |
metadata |
m |
Extract metadata for scripts and automation |
publish |
p |
๐ง Publish to Typst Universe (coming soon) |
Package Management (utpm pkg)
| Command | Alias | Description |
|---|---|---|
list |
l |
List installed packages (supports tree view) |
path |
p |
Show package directory path |
unlink |
u |
Remove a linked package |
get |
g |
Get package info from remote |
install |
i |
Install package from git repository |
Other Commands
utpm generate(g) - Generate shell completion scripts
Global Options
)
)
๐ก Tip: Use
utpm <command> --helpfor detailed command-specific help
โ๏ธ Configuration
UTPM extends the standard typst.toml with a [tool.utpm] section for package-specific settings.
Excluding Files
Control which files are included when linking or publishing:
[]
= "my-package"
= "0.1.0"
# ... other standard fields
[]
= [
".git",
".github",
"*.md", # Exclude all Markdown files
"tests/", # Exclude tests directory
"examples/", # Exclude examples
"**/*.bak", # Exclude backup files recursively
]
Pattern Syntax:
*- Match files in current directory (e.g.,*.md)**- Match recursively (e.g.,**/*.tmp)!pattern- Negate/include pattern- Patterns ending with
/match directories only
Ignore Files Respected:
.gitignore(default: enabled).typstignore(default: enabled).ignore(optional, enable with--ignore)- Custom patterns in
[tool.utpm]
Metadata Extraction
Extract package metadata for scripts and CI/CD:
# Get specific field (outputs plain text)
VERSION=
NAME=
# Use in automation
# Get all metadata as JSON
|
Available fields: name, version, entrypoint, authors, license, description, repository, homepage, keywords, categories, disciplines, compiler, exclude
๐ Example: See assets/typst.toml.example for a complete configuration reference.
๐ Documentation
| Document | Description |
|---|---|
| ๐ Complete Guide | Comprehensive guide for users, package authors, and contributors |
| ๐ค Contributing | Code standards, testing, and contribution process |
| ๐ ๏ธ Development | Development setup, workflow, and tools |
| ๐งช Testing | Testing guide, running tests, and writing new tests |
๐ค Contributing
We welcome contributions of all kinds! Whether you're fixing bugs, adding features, or improving documentation, your help is appreciated.
Quick Start for Contributors
# 1. Install development tools
# 2. Setup git hooks (optional but recommended)
# 3. Before committing
What You Can Do
- ๐ Report bugs - Open an issue with details
- ๐ก Suggest features - Share your ideas in discussions
- ๐ Improve docs - Help make documentation clearer
- ๐ง Fix issues - Pick up a "good first issue"
- โจ Add features - Implement new functionality
See CONTRIBUTING.md for detailed guidelines on code standards, testing, and the PR process.
๐ License
MIT License - see LICENSE for details.
๐ Acknowledgments
Built with โค๏ธ by the Typst Community
Key Dependencies:
- Typst - The amazing typesetting system
- Rust - Systems programming language
- Clap - Command-line argument parsing
Made with โค๏ธ for the Typst community