npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pi-sixel-math

v0.1.2

Published

Real LaTeX math in the Pi agent TUI as SIXEL images, built for Windows Terminal

Readme

pi-sixel-math

Real LaTeX math in the Pi agent TUI, rendered as SIXEL images on Windows Terminal. No browser, no WezTerm/Kitty, no WSL, no TeX install.

npm CI license node

Pi renders inline images through the Kitty and iTerm2 protocols only, and Windows Terminal implements neither — so image-based math extensions silently do nothing there. Windows Terminal does implement SIXEL. This extension typesets formulas with MathJax, rasterizes them with resvg, and sends them to the terminal as SIXEL, sized to the terminal's cell grid.

The transcript, the session and the model context keep the original LaTeX. Only the rendering changes.

Requirements

| | | | --- | --- | | Windows Terminal | 1.22+ (SIXEL), tested on 1.24 | | Pi | @earendil-works/pi-coding-agent 1.0+, tuiMode: "regular" | | Node.js | 22.19+ (tested on 24) |

Nothing else — MathJax and resvg are npm dependencies. chafa is not required.

Install

pi install npm:pi-sixel-math

Restart Pi, then /sixel-math status. Other install routes:

pi -e npm:pi-sixel-math                  # try it for one session
pi install D:\path\to\pi-sixel-math      # from a checkout
pi remove pi-sixel-math                  # uninstall

Usage

Write math as usual — display math becomes an image automatically.

$$
L(\theta)=-\frac{1}{N}\sum_{i=1}^{N}\log\frac{\exp(s_{i,i}/\tau)}{\sum_{j=1}^{N}\exp(s_{i,j}/\tau)}
$$

| Command | | | --- | --- | | /sixel-math on · off · toggle | enable or disable images | | /sixel-math demo | render the six demo formulas into the transcript | | /sixel-math status | state, colors, grid, cache sizes | | /sixel-math clear | drop caches | | /sixel-math bg #1e1e1e | background used to blend glyph edges (auto, transparent) |

Configuration lives in ~/.pi/agent/sixel-math.json or in PI_SIXEL_MATH_* environment variables; see src/config.ts.

Supported syntax

  • Display math: $$…$$, \[…\]
  • Inline math: $…$, \(…\) — rendered by Pi's built-in Unicode math renderer (inline images are experimental, PI_SIXEL_MATH_INLINE=1)
  • Whole TeX package set from MathJax: fractions, roots, scripts, limits, big operators, \mathbb, matrices, cases, align, \text, …
  • Fenced code blocks, indented code, inline code and escaped \$ are never touched
  • A formula that cannot be typeset falls back to its LaTeX source

Limitations

  • tuiMode: "fullscreen" (alt screen) is not supported; the extension stays off there. Use "tuiMode": "regular".
  • Formula baselines align to the row grid, not to the text baseline.
  • Formula backgrounds are left unpainted, so the terminal background — wallpaper or acrylic included — shows through. Glyph edges are blended against the background color from OSC 11 / /sixel-math bg; with transparent they are thresholded instead of blended.
  • Formulas taller than maxRows (12 by default) are scaled down, not split.
  • Copying a formula out of the terminal is not possible — the LaTeX in the transcript is the source of truth.

Development

npm ci
npm test              # 51 tests, including a terminal emulator for TUI layout
npm run build
npm run probe         # measure Windows Terminal's SIXEL behaviour
npm run visual-test   # the six acceptance formulas
npm run tui-experiment # pi-tui renderer with streaming and redraws

See docs/how-it-works.md for the rendering pipeline and the terminal-specific details, and docs/testing.md for what each test covers.

License

MIT