pi-typst

Pi extension that renders Typst into terminal images

Packages

Package details

extension

Install pi-typst from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-typst
Package
pi-typst
Version
0.0.6
Published
Oct 12, 2026
Downloads
1,259/mo · 43/wk
Author
iharuya
License
MIT
Types
extension
Size
1.5 MB
Dependencies
0 dependencies · 4 peers
Pi manifest JSON
{
  "image": "https://raw.githubusercontent.com/iharuya/pi-typst/main/assets/demo.png",
  "extensions": [
    "./extensions/index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-typst

CI npm License: MIT

pi-typst demo as of v0.0.4

A Pi extension that renders Typst markup into terminal images.

Install

pi install npm:pi-typst

Prerequisites

Requires the Typst CLI to be installed and available on your system.

[!WARNING] The default terminals on macOS (Terminal.app) and Ubuntu (GNOME Terminal / Ptyxis) are not supported.

Rendered output is displayed as an inline image, so you need a terminal that supports one of the following:

Terminal multiplexers

Pi turns off inline images inside terminal multiplexers such as tmux and Herdr, so the typst tool fails there by default.

Herdr 0.9 and later render Kitty graphics when the outer terminal supports them. To enable images in Herdr, set PI_IMAGE_PROTOCOL before starting Pi:

export PI_IMAGE_PROTOCOL=kitty

Alternatively, set terminal.images to "kitty" in Pi's settings.

pi-typst shows a warning at startup inside Herdr 0.9 and later while images are off.