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

llms-full-unbind

v0.1.2

Published

Unbind llms-full.txt into individual pages.

Downloads

329

Readme

llms-full-unbind

Unbind llms-full.txt into individual pages programmatically.

A specialized parser designed to extract pages from the monolithic llms-full.txt format.

NPM license NPM version

This library is primarily intended for use in the llms-full-unbind-mcp package, but can be used in other projects as well.

Usage

Installation

npm install llms-full-unbind

Basic Usage

Fetch the text content and unbind it in one go.

import { unbind } from "llms-full-unbind";

// 1. Fetch the remote llms-full.txt
const response = await fetch("https://example.com/llms-full.txt");
const text = await response.text();

// 2. Unbind into pages
const pages = Array.from(unbind(text));

console.log(`Extracted ${pages.length} pages.`);

Streaming Usage (Recommended)

For large llms-full.txt files, use unbindStream to process data chunk-by-chunk directly from the network response. This minimizes memory usage.

import { unbindStream } from "llms-full-unbind";

const response = await fetch("https://example.com/llms-full.txt");

if (!response.body) {
  throw new Error("Response body is empty");
}

// Pipe the Web Stream directly into the parser
for await (const page of unbindStream(response.body)) {
  console.log(`Processed: ${page.title}`);
  // e.g. Save to DB or display immediately
}

Supported Formats

This library automatically detects and parses five common llms-full.txt formats:

<doc> Tag Based Format

This format wraps each page in the <doc> tag with optional metadata attributes. Generated by the llms_txt2ctx CLI from the llms-txt package. Used by fastht.ml and similar projects.

<doc title="Page Title" desc="Optional description">
Content of the page...
</doc>

<page> Tag Based Format

This format wraps each page in the <page> tag. Used by cloudflare.com project.

<page>
Content of the page...
</page>

Frontmatter-separated Format

Pages are separated by frontmatter-style metadata blocks. Generated by vitepress-plugin-llms. Used by vuejs.org, vitejs.dev, vitepress.dev and similar VitePress-based projects.

# Page Title {#optional-anchor}

Content of the page...

---
url: /optional/metadata.md
---

# Another Page

More content...

Header and Source URL Format

Each page starts with a markdown header followed by a Source: line indicating the page URL. Generated by Mintlify. Used by modelcontextprotocol.io and bun.sh.

# Page Title
Source: https://example.com/path/to/page

Content of the page...

# Another Page
Source: https://example.com/path/to/another

More content...

H1 Header Based Format

Pages are separated by H1 headers (# Title). Used by projects like svelte.dev, nuxt.com, and docs.astro.build.

# Page Title

Content of the page...

# Another Page

More content...

API

unbind(content: string): Iterable<Page>

Parses the entire string synchronously and returns an iterable (Generator) of pages. Use Array.from(unbind(content)) to get an array.

unbindStream(stream: ReadableStream | AsyncIterable): AsyncIterable<Page>

Accepts a standard Web ReadableStream (returned by fetch) or any Async Iterable. Yields pages as soon as they are parsed.

Type Definition: Page

export interface Page {
  title: string;
  content: string; // The extracted text content
  metadata?: Record<string, unknown>;
}

License

MIT