Skip to content

v0.2.0

Latest

Choose a tag to compare

@github-actions github-actions released this 09 Oct 12:18
· 1 commit to main since this release
v0.2.0
23189d1

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), --refresh to bypass local cache, and --json structured 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 .typ files 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 .typ files to latest Universe versions. Preserves formatting, indentation, quotes, and line endings (LF/CRLF). Writes updates atomically via WriteFileAtomic. Supports -f, --file to target specific files, -n, --dry-run to 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, --all to include Typst download cache, -t, --tree for hierarchical ASCII tree view with source badges (installed, dev-link, broken-link, cache), and --json output.
    • 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 @local shortcuts (pkg[:ver]). Automatically cascades and removes empty parent directories upon deletion. Includes -y, --force prompt bypass and -n, --dry-run preview.
    • typush clone <package> [dest]: Downloads .tar.gz package 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, --force to overwrite non-empty target directories.
    • typush download --subdir: Adds --subdir <dir> to typush 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-run mode.
  • 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.
  • 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, keeping stdout clean for JSON exports, tabular data, and script pipelines.

Installation

Using Go:

go install github.com/Vncntvx/typush@v0.2.0

Or download precompiled binaries for macOS, Linux, and Windows from the Assets below.