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

@llamaindex/liteparse-pi-extension

v0.1.0

Published

Extension for Pi agent which adds parsing, screenshotting and lexical search capabilities over unstructured documents

Readme

@llamaindex/liteparse-pi-extension

A pi-coding-agent extension that exposes LiteParse to the agent as a set of first-class tools.

LiteParse is a fast, local, open-source document parsing library written in Rust: PDFs, scanned images, and Office files in → text + spatial layout (bounding boxes) out. No LLMs, no cloud calls. This extension lets a pi agent reach for those capabilities the same way it would reach for read or grep.

Tools

| Tool | What it does | | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | liteparse_parse | Parse a local PDF / image / Office file and return its extracted text. Supports targetPages (e.g. "1-3,7"), optional OCR, custom DPI, passwords, and an includeItems flag for per-text-item bounding boxes. Text output is truncated to ~50 KB / 2000 lines. | | liteparse_screenshot | Render one or more pages of a local document as PNG images and return them as image content blocks the model can look at directly. Useful when text extraction isn't enough — figures, tables, signatures, layout. | | liteparse_search | Search a parsed document for a phrase and return every hit with its page number and bounding box. Great for building visual citations or jumping to the source of a quoted snippet. |

All three tools come with promptGuidelines so the model knows, for example, to prefer liteparse_parse over read when the user points it at a PDF.

Install / run

This repo uses Bun.

bun install

Run pi with this extension loaded:

bunx pi -e ./src/index.ts

The repo's package.json also declares the extension under the pi key, so if you install it as a dependency in another pi project it will be picked up automatically:

{
  "pi": {
    "extensions": ["./src/index.ts"],
  },
}

Example session

> summarize page 1 of data/whitepaper.pdf

[agent calls liteparse_parse with { path: "data/whitepaper.pdf", targetPages: "1" }]

The first page introduces …
> look at the chart on page 4 of data/report.pdf and tell me the y-axis label

[agent calls liteparse_screenshot with { path: "data/report.pdf", pages: [4] }]

The y-axis is labeled "Revenue (USD millions)".
> find every mention of "Section 4.2" in data/spec.pdf

[agent calls liteparse_search with { path: "data/spec.pdf", phrase: "Section 4.2" }]

Found 6 hits:
  p12  [102.3, 540.1  78.4×11.0]   Section 4.2
  p13  [102.3, 312.7  78.4×11.0]   Section 4.2
  …

Development

# Type-check
bun run typecheck

# Format
bun run format

# Lint
bun run lint

How it works

src/index.ts defines three tools with defineTool(...) from @earendil-works/pi-coding-agent, then registers them in the default export:

export default function (pi: ExtensionAPI) {
  pi.registerTool(parseTool);
  pi.registerTool(screenshotTool);
  pi.registerTool(searchTool);
}

Each tool wraps the LiteParse class from @llamaindex/liteparse:

const parser = new LiteParse({ quiet: true, ocrEnabled, targetPages, ... });
const result = await parser.parse(absPath);

Paths are resolved against ctx.cwd, with a leading @ stripped to play nice with pi's @-prefixed file references. Screenshots come back as Buffers and are returned as base64 image content blocks ({ type: "image", data, mimeType: "image/png" }) so the model can see them directly.