Repository navigation
Releases: Vncntvx/typush
Release list
v0.2.0
Minor release expanding typush into a full-lifecycle Typst package manager with official Universe package discovery, dependency inspection and upgrades, local package management, and multi-file version synchronization.
Key Features
-
Package Discovery and Registry Queries (
typush search,typush info):typush search <query>: Weighted search across package names, keywords, categories, descriptions, and authors. Supports-l, --limit(default 20),--refreshto bypass local cache, and--jsonstructured output.typush info <package>[:version]: Inspects package metadata, authors, license, compiler requirements, categories, disciplines, repository URLs, and complete version release history.- Caching & offline fallback: Implements a 15-minute disk cache for the Universe index (
packages.typst.org) with automatic offline fallback and stale warnings on network failures.
-
Dependency Inspection and Updating (
typush outdated,typush update):typush outdated [path]: Recursively scans.typfiles for@preview/<name>:<version>imports (skipping ignored files), compares them against latest Universe releases, and reports status (Up to date,Update available,Unknown) with exact file paths and line numbers.typush update [package...]: Upgrades dependency version strings in.typfiles to latest Universe versions. Preserves formatting, indentation, quotes, and line endings (LF/CRLF). Writes updates atomically viaWriteFileAtomic. Supports-f, --fileto target specific files,-n, --dry-runto preview line diffs, and guarantees forward-only version progress.
-
Local Package Lifecycle Management (
typush list,typush uninstall,typush clone,typush download):typush list [namespace]: Discovers and displays packages in local Typst directories, sorted by namespace and package name ascending, and SemVer descending. Supports-a, --allto include Typst download cache,-t, --treefor hierarchical ASCII tree view with source badges (installed,dev-link,broken-link,cache), and--jsonoutput.typush uninstall <target>: Removes packages from local Typst directories. Flexible target syntax supports specific versions (@ns/pkg:ver), entire packages (@ns/pkg), whole namespaces (@ns), or@localshortcuts (pkg[:ver]). Automatically cascades and removes empty parent directories upon deletion. Includes-y, --forceprompt bypass and-n, --dry-runpreview.typush clone <package> [dest]: Downloads.tar.gzpackage archives directly from the Universe CDN and extracts them locally. Enforces strict Zip-Slip and Tar-Slip path traversal checks on both file paths and symlink targets to reject directory traversal outside the destination. Supports-f, --forceto overwrite non-empty target directories.typush download --subdir: Adds--subdir <dir>totypush download, enabling package extraction and installation from monorepo subdirectories with path traversal protection.
-
Multi-File Version Synchronization (
typush bump):- Added
-i, --include <files>to synchronize version bumps across multiple documentation or project files (e.g.README.md). - Added
-t, --tag <tag>to target replacements inside custom HTML/XML tags (e.g.<version>0.2.0</version>or<!-- version -->0.2.0<!-- /version -->). - Generates line-by-line
-/+unified diff previews in-n, --dry-runmode.
- Added
-
Shell Autocompletion (
typush completion):- Added
typush completion <bash|zsh|fish|powershell>to generate native shell autocompletion scripts with built-in setup instructions for each shell.
- Added
-
Standardized Dry-Run Previews & Architecture:
- Standardized preview output across all mutating commands (
install,uninstall,download,clone,bump,clean,update) using unified framing (previewNote,previewItems). - Strict output stream separation: all diagnostic messages, progress logs, and preview banners are routed to
stderr, keepingstdoutclean for JSON exports, tabular data, and script pipelines.
- Standardized preview output across all mutating commands (
Installation
Using Go:
go install github.com/Vncntvx/typush@v0.2.0Or download precompiled binaries for macOS, Linux, and Windows from the Assets below.
v0.1.0
First official release of typush, a CLI tool for developing, validating, and publishing Typst packages.
Key Features
- Package Scaffolding (
typush init): Interactively generatestypst.toml, default entrypointsrc/lib.typ,README.md, andLICENSE. Automatically infers git author (Name <email>) and repository HTTPS URL from git configuration. Supports template packages with customizable template directories and entrypoints. - Local Development and Debugging (
typush dev,typush dev list,typush clean): Symlinks the current package directory into the local@previewnamespace, allowing other local Typst documents to#importand test changes in real time without reinstallation.dev listdisplays all active symlinks and resolved targets;cleanremoves development links with optional--dry-runpreview. - Local Specification and Compiler Verification (
typush check): Replicates official Universe CI validation locally and offline. Verifies package metadata (kebab-case, SemVer, SPDX license expressions, allowed categories and disciplines), documentation links and image alt text, forbidden font files (.ttf/.otf), and runs isolated compilation checks whentypstis installed. - Version Bumping (
typush bump): Increments or setspackage.versionintypst.tomlusingpatch,minor,major, or explicit version arguments, enforcing anti-downgrade checks and updating self-referential package versions inREADME.md. - Universe Submission (
typush publish universe): Automates pull request submission to the officialtypst/packagesrepository. Uses GitHub CLI (gh) for authentication, provisions user forks, utilizes Gitsparse-checkoutto upload only the package directory in a single commit, and opens pre-checked Draft Pull Requests. - Pull Request and CI Tracking (
typush pr status,typush pr checks): Displays PR metadata and reviewer comments, and monitors official upstream GitHub Actions check runs with optional-w, --watchwaiting.
Installation
Using Go:
go install github.com/Vncntvx/typush@v0.1.0Or download precompiled binaries for macOS, Linux, and Windows from the Assets below.
Acknowledgments
Thanks to @maxchang3 in PR #1 for contributing the Git Trees API directory traversal fix.