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

@hugomrdias/docs

v0.1.11

Published

Starlight plugins for TypeScript documentation and AI chat integration

Readme

@hugomrdias/docs NPM Version License

Starlight plugins for TypeScript documentation and AI chat integration

Two powerful plugins for Starlight documentation sites: generate API docs from TypeScript types using TypeDoc, and add page actions for copying content and opening pages in AI chat services.

Install

pnpm install @hugomrdias/docs

TypeDoc Plugin

Generates markdown documentation from TypeScript source code using TypeDoc. Automatically converts your TypeScript types, interfaces, classes, and functions into Starlight-compatible markdown files.

Features

  • Automatic markdown generation from TypeScript source code
  • Custom Starlight theme with proper URL routing
  • Watch mode support for development (auto-enabled in dev mode)
  • Pagination support with prev/next navigation links
  • Special JSDoc tag handling: @deprecated, @alpha, @beta, @experimental with Starlight asides
  • Configurable output directory
  • Supports all TypeDoc entry point strategies (packages, resolve, expand)

Configuration

import { docsPlugin } from '@hugomrdias/docs/starlight-typedoc'

docsPlugin({
  // Output directory relative to src/content/docs/
  outputDirectory: 'api', // default: 'api'
  
  // Enable prev/next navigation links in footer
  pagination: false, // default: false
  
  // Watch mode for development (auto-enabled in dev for non-package strategies)
  watch: false, // default: false (auto-enabled in dev)
  
  // TypeDoc configuration options
  typeDocOptions: {
    entryPointStrategy: 'packages',
    entryPoints: ['../packages/*'],
    tsconfig: '../tsconfig.json',
    excludeInternal: true,
    excludePrivate: true,
    excludeProtected: true,
    // ... all other TypeDoc options
  }
})

Usage

// astro.config.mjs
import starlight from '@astrojs/starlight'
import { defineConfig } from 'astro/config'
import { docsPlugin } from '@hugomrdias/docs/starlight-typedoc'

export default defineConfig({
  site: 'https://docs.dev',
  integrations: [
    starlight({
      title: 'My Documentation',
      plugins: [
        docsPlugin({
          pagination: true,
          outputDirectory: 'reference',
          typeDocOptions: {
            entryPointStrategy: 'packages',
            entryPoints: ['../packages/*'],
            tsconfig: '../tsconfig.json',
          },
        }),
      ],
    }),
  ],
})

LLMs Plugin

Adds page action buttons to your documentation pages and generates an llms.txt file for AI chat integration. Enables users to quickly copy page content or open pages in AI chat services with pre-filled prompts.

Features

  • Copy Markdown button to copy page content to clipboard
  • Open dropdown menu with links to AI chat services (ChatGPT, Claude, T3 Chat, v0)
  • Pre-filled prompts when opening pages in AI chats (customizable template)
  • Automatic /llms.txt endpoint generation listing all documentation URLs
  • Markdown file generation during build (accessible at /{page}.md)
  • Customizable actions: enable/disable built-ins, add custom action links

Configuration

import { llmsPlugin } from '@hugomrdias/docs/starlight-llms'

llmsPlugin({
  // Prompt template for AI chat services (use {url} as placeholder)
  prompt: 'Read {url}. I want to ask questions about it.', // default shown
  
  // Base URL for llms.txt generation (uses Astro site config if not provided)
  baseUrl: 'https://docs.dev',
  
  // Site title (defaults to Starlight title)
  title: 'My Documentation',
  
  // Site description (defaults to Starlight description)
  description: 'Documentation for my project',
  
  // Configure which actions to display
  actions: {
    chatgpt: true,    // default: true
    claude: true,     // default: true
    t3chat: false,    // default: false
    v0: false,        // default: false
    markdown: true,   // default: true
    custom: {
      // Add custom action links
      myService: {
        label: 'Open in My Service',
        href: 'https://myservice.com/?query='
      }
    }
  }
})

Usage

// astro.config.mjs
import starlight from '@astrojs/starlight'
import { defineConfig } from 'astro/config'
import { llmsPlugin } from '@hugomrdias/docs/starlight-llms'

export default defineConfig({
  site: 'https://docs.dev', // Required for llms.txt generation
  integrations: [
    starlight({
      title: 'My Documentation',
      plugins: [
        llmsPlugin({
          prompt: 'Read {url} and explain its main points briefly.',
          actions: {
            chatgpt: true,
            claude: true,
            v0: true,
            markdown: true,
            custom: {
              customAi: {
                label: 'Open in Custom AI',
                href: 'https://custom-ai.com/?q='
              }
            }
          }
        }),
      ],
    }),
  ],
})

llms.txt

The plugin automatically generates an /llms.txt endpoint that lists all your documentation URLs in a structured format. This file can be used by AI tools to discover and index your documentation.

Combined Usage

Both plugins work together seamlessly:

// astro.config.mjs
import starlight from '@astrojs/starlight'
import { defineConfig } from 'astro/config'
import { docsPlugin } from '@hugomrdias/docs/starlight-typedoc'
import { llmsPlugin } from '@hugomrdias/docs/starlight-llms'

export default defineConfig({
  site: 'https://docs.dev',
  integrations: [
    starlight({
      title: 'My Documentation',
      plugins: [
        docsPlugin({
          pagination: true,
          outputDirectory: 'reference',
          typeDocOptions: {
            entryPointStrategy: 'packages',
            entryPoints: ['../packages/*'],
            tsconfig: '../tsconfig.json',
          },
        }),
        llmsPlugin({
          prompt: 'Read {url} and help me understand it.',
        }),
      ],
    }),
  ],
})

License

MIT © Hugo Dias