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

docs-to-llm

v1.0.1

Published

CLI tool to crawl documentation websites and aggregate content into a structured llm.txt file

Readme

    ____  ____  ___________      __________         __    __    __  ___
   / __ \/ __ \/ ____/ ___/     /_  __/ __ \       / /   / /   /  |/  /
  / / / / / / / /    \__ \       / / / / / /      / /   / /   / /|_/ /
 / /_/ / /_/ / /___ ___/ /      / / / /_/ /      / /___/ /___/ /  / /
/_____/\____/\____//____/      /_/  \____/      /_____/_____/_/  /_/

CLI tool to crawl documentation websites and aggregate content into a structured llm.txt file optimized for LLM consumption.

Features

  • Simple command-line interface
  • Automatic URL discovery and crawling
  • Content extraction from any HTML-based documentation site
  • Structured Markdown output
  • Preserves code blocks, tables, and API documentation
  • Concurrent page fetching with rate limiting
  • Error handling with retry logic
  • Progress indicator during crawling

Installation

npm install -g docs-to-llm

Or use directly with npx:

npx docs-to-llm <URL>

Usage

docs-to-llm <DOCUMENTATION_URL> [options]

Options

  • -o, --output <filename> - Custom output filename (default: llm.txt)
  • -m, --max-pages <number> - Maximum number of pages to crawl
  • -t, --timeout <milliseconds> - Request timeout per page (default: 10000)
  • --exclude <pattern> - Exclude URLs matching a regex pattern (can be used multiple times)
  • --include-only <pattern> - Only include URLs matching a regex pattern
  • -c, --concurrency <number> - Number of concurrent requests (default: 5)
  • -v, --verbose - Enable detailed logging
  • -h, --help - Display help information

Examples

Basic usage:

docs-to-llm https://react.dev

Custom output file:

docs-to-llm https://docs.python.org -o python-docs.txt

Limit pages and concurrency:

docs-to-llm https://nodejs.org -m 50 -c 3

Exclude certain paths:

docs-to-llm https://example.com/docs --exclude /api --exclude /login

Include only specific paths:

docs-to-llm https://example.com --include-only /docs/guides

The command that was used to generate the ./example-output.txt file is:

node bin/docs-to-llm https://opencode.ai/docs --max-pages 200 --timeout 10000 --output ./example-output.txt

Output Format

The generated llm.txt file contains:

  • Document metadata (source URL, generation time, page count)
  • Table of contents
  • Each page's content with source URL
  • Properly formatted Markdown for LLM consumption

How It Works

  1. URL Discovery: Starts from the provided URL and discovers all internal links
  2. Crawling: Fetches all discovered pages concurrently with rate limiting
  3. Content Extraction: Identifies and extracts main content, removing navigation and non-content elements
  4. Markdown Conversion: Converts HTML to structured Markdown
  5. Output Generation: Creates a single, well-formatted file with metadata and table of contents

Requirements

  • Node.js 18.0.0 or higher

License

MIT