Repository navigation
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.