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-mlx-vision

v0.2.3

Published

Local MLX vision for text-only models on Apple Silicon Macs: a describe_image tool backed by LiquidAI LFM2.5-VL-3B-MLX-8bit, so non-vision models (DeepSeek, etc.) can see images.

Readme

pi-mlx-vision

Local vision for text-only models in pi — for Apple Silicon Macs (MLX).

Registers a describe_image tool backed by a local vision language model so your main reasoning model can decide when it needs visual understanding — even if that model cannot see images itself (e.g. DeepSeek V4 Flash, or any text-only model).

Vision model: LiquidAI LFM2.5-VL-3B-MLX-8bit — a 3B parameter VLM, MLX-quantized to 8-bit, running fully locally via mlx-vlm. Nothing leaves your machine.

How it works

  • describe_image tool — takes an image path or URL and an optional question; runs the local VLM and returns a text description.
  • Persistent inference server — the model is loaded once per session and kept resident (vision_server.py, a minimal stdio protocol). Warm calls take ~0.3–1.3 s instead of re-loading the 3.5 GB model every time; parallel tool calls serialize on one model.
  • Lazy backend import — the CLI cold-starts in ~10 ms; mlx_vlm and the model are loaded on the first describe() call, not at import time.
  • Attached images — when you attach an image to a pi prompt, the extension saves it to .pi/attachments/ and tells the model about it. The model then decides whether to call describe_image.
  • The vision model is a passive responder: it only answers the specific question the main model asks. It never plans or decides anything.

Requirements

  • macOS on Apple Silicon (M1/M2/M3/M4/M5 — MLX only runs on Macs)
  • uv (brew install uv)
  • ~3.5 GB free disk for the model (downloaded to the Hugging Face cache on first use)

Install

# from the npm registry (listed on pi.dev/packages) — installs latest
pi install npm:pi-mlx-vision

# or pin a version
pi install npm:[email protected]

# or directly from git
pi install git:github.com/abdulchotu7/[email protected]

First run downloads the model weights (~3.5 GB) and loads the model (~3–8 s). After that, the model stays resident for the session, so subsequent calls return in well under a second.

Usage

In any pi session:

  • Attach an image and ask a question about it, or
  • Ask about an image at a path or URL, e.g. "What's in ~/Downloads/photo.png?"

The model decides when to invoke describe_image; no special syntax needed. If your active model already supports images natively (e.g. Gemini, Claude), the extension stays out of the way.

Overriding the model

The default vision model is LiquidAI/LFM2.5-VL-3B-MLX-8bit. Override with the VISION_MODEL_ID environment variable (must be an MLX-compatible VLM):

VISION_MODEL_ID=mlx-community/other-vlm-4bit uv run vision.py image.png

Development

uv run vision.py path/to/image.png --prompt "What do you see?"   # one-shot CLI
uv run vision_server.py                                          # persistent stdio server (used by the extension)

vision.py and vision_server.py are thin wrappers over the reusable VisionModel interface in vision_model.py.