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

@xberg-io/llamaindex-xberg

v1.0.14

Published

LlamaIndex.TS reader and node parser for Xberg — extract text, tables, metadata, and structure-aware nodes from 101 document formats with optional OCR.

Readme

@xberg-io/llamaindex-xberg

npm

A LlamaIndex.TS reader and node parser for Xberg. XbergReader turns a file, a directory, or raw bytes into LlamaIndex Documents with the extracted text, tables, and rich metadata from 101 formats — with optional OCR for scans and images. XbergNodeParser then splits those documents into TextNodes along Xberg's own semantic boundaries (native chunks, or structural elements) instead of a blind character window.

Extraction runs locally in-process through the @xberg-io/xberg native binding. No API key, no cloud call, no data leaves your machine.

Installation

@llamaindex/core is a peer dependency — install it alongside the reader:

npm install @xberg-io/llamaindex-xberg @llamaindex/core

Node.js 20.15+ is required on a platform for which @xberg-io/xberg ships a prebuilt binary (Linux x64/arm64 glibc or musl, macOS arm64, Windows x64/arm64).

Quick start

import { XbergReader } from "@xberg-io/llamaindex-xberg";

// Single file — one Document (or one per page with pages.extractPages)
const reader = new XbergReader();
const docs = await reader.loadData("report.pdf");

// Multiple files — one batched extraction
const many = await reader.loadData(["a.pdf", "b.docx"]);

// Raw bytes — mimeType is required
const fromBytes = await reader.loadData({ data: fileBytes, mimeType: "application/pdf" });

By default the reader requests Xberg's element_based result format so each document carries a structural element stream for the node parser. Errors are logged and the failed input is skipped; pass { raiseOnError: true } to propagate them instead.

Structure-aware node parsing

Pair the reader with XbergNodeParser to split documents into nodes along Xberg's boundaries. It prefers native chunks (ExtractionConfig.chunking) and falls back to structural elements:

import { XbergReader, XbergNodeParser } from "@xberg-io/llamaindex-xberg";

const reader = new XbergReader({ extractionConfig: { chunking: { max_chars: 1000, max_overlap: 200 } } });
const documents = await reader.loadData("report.pdf");

const parser = new XbergNodeParser();
const nodes = parser.getNodesFromDocuments(documents);

The reader forwards the chunk/element payload on private metadata keys that are excluded from LLM and embedding input; the parser consumes them and strips them from the emitted nodes.

Supported formats

Xberg extracts from 101 formats including PDF, DOCX, PPTX, XLSX, HTML, EPUB, images, and more. See the Xberg documentation for the full list and the extraction configuration reference.

Part of Xberg.io

  • Xberg — document intelligence: text, tables, metadata from 101 formats with optional OCR.
  • Xberg Enterprise — managed extraction API with SDKs, dashboards, and observability.

License

MIT