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

svelte-doc-llm

v0.8.0

Published

Convert markdown documentation to LLM-friendly format

Readme

svelte-doc-llm

A Node.js tool to convert Svelte component documentation to LLM-friendly markdown format.

Installation

pnpm i -D svelte-doc-llm
# or
npm install -g svelte-doc-llm
# or
npx svelte-doc-llm

Quick Start

  1. Create a llm.config.js file in your project root (optional)
  2. Run svelte-doc-llm in your project directory

CLI Options

# Convert all documentation (default)
svelte-doc-llm

# Convert only specific directories
svelte-doc-llm -d components forms

# Convert only specific files
svelte-doc-llm -f components/alert.md forms/input.md

# Mix directories and files
svelte-doc-llm -d typography -f components/alert.md

# Skip cleanup phase (useful for incremental updates)
svelte-doc-llm -d components --skip-clean

# Show help
svelte-doc-llm --help

Command Line Arguments

  • -d, --directories <dir1> <dir2> ... - Convert only specified directories (relative to srcDir)
  • -f, --files <file1> <file2> ... - Convert only specified files (relative to srcDir)
  • --skip-clean - Skip the cleanup phase, only convert specified files/directories
  • -h, --help - Show help message

Configuration

Configuration can be provided in a llm.config.js file:

export default {
  srcDir: './src/routes/docs', // Input directory with markdown files
  outDir: './src/routes/llm', // Output directory for processed files
  format: 'md', // Output format
  dataDir: './src/routes/component-data', // Directory with component JSON data
  ignore: [], // Sections to remove (by heading)
  stripPrefix: 'docs',
  cleanOutDir: true, // Whether to completely clean the output directory
  ignoreDirs: [], // Directory names to preserve at any nesting level (e.g., ['[...slug]'])
  // Required fields - must be provided in llm.config.js
  baseUrl: null,
  repo: null,
  pkgName: null,
  // Optional fields
  contextOrder: ['pages', 'components', 'forms', 'typography', 'extend', 'utilities'],
  docsDir: 'src/routes',
  examplesDir: 'src/routes/docs-examples'
};

Default values will be used if no config file is found:

Features

  • Selective Processing: Convert only specific directories or files for faster iteration
  • Frontmatter Processing: Extracts title metadata
  • Code Block Formatting: Normalizes Svelte code block syntax
  • Content Filtering: Removes specified sections
  • Component Data Integration: Imports and formats component definitions from JSON
  • Script Tag Removal: Cleans up script sections
  • Related Links Formatting: Processes "See also" sections into standardized links
  • Flexible Cleanup: Full, selective, or skip cleanup entirely

Use Cases

  • Preparing documentation for consumption by AI assistants
  • Converting component libraries to LLM-compatible formats
  • Creating self-contained reference materials for language models
  • Following the llmstxt.org standard for LLM-friendly content

License

MIT

Note for publishing a package

pnpm ch
pnpm cv
git add .
git commit -m "v0.5.1"
git push
pnpm changeset publish
git push --tags