Skip to content

Releases: Vncntvx/typush

Release list

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 09 Oct 12:18
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.

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 08 Oct 16:14
v0.1.0
3b4a077

First official release of typush, a CLI tool for developing, validating, and publishing Typst packages.

Key Features

  • Package Scaffolding (typush init): Interactively generates typst.toml, default entrypoint src/lib.typ, README.md, and LICENSE. 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 @preview namespace, allowing other local Typst documents to #import and test changes in real time without reinstallation. dev list displays all active symlinks and resolved targets; clean removes development links with optional --dry-run preview.
  • 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 when typst is installed.
  • Version Bumping (typush bump): Increments or sets package.version in typst.toml using patch, minor, major, or explicit version arguments, enforcing anti-downgrade checks and updating self-referential package versions in README.md.
  • Universe Submission (typush publish universe): Automates pull request submission to the official typst/packages repository. Uses GitHub CLI (gh) for authentication, provisions user forks, utilizes Git sparse-checkout to 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, --watch waiting.

Installation

Using Go:

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

Or 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.