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

starlight-llm-actions

v0.8.0

Published

Starlight plugin: Page Actions dropdown with Copy/View/PDF and Open-in-LLM buttons (ChatGPT, Claude, Gemini, Perplexity, T3 Chat, Cursor, Copilot).

Readme

Getting Started

Want to get started immediately? Check out the getting started guide on the documentation site.

Features

A Starlight plugin that adds a Page Actions dropdown to every doc page.

  • Copy as Markdown — fetches the page's markdown source and writes to clipboard
  • View as Markdown — opens the markdown source in a new tab
  • Save as PDF — triggers the browser print dialog (off by default)
  • Open in <provider> — opens the current page in ChatGPT, Claude, Gemini, GitHub Copilot, Perplexity, T3 Chat, or Cursor using the most reliable per-provider strategy (URL fetch / inline content / clipboard + open)
  • Per-page opt-out via frontmatter
  • Optional print/PDF snapshot disclaimer with branding row

Install

npm install starlight-llm-actions

Usage

Add the plugin to your Starlight config:

// astro.config.mjs
import { defineConfig } from 'astro/config';
import starlight from '@astrojs/starlight';
import starlightLlmActions from 'starlight-llm-actions';

export default defineConfig({
  integrations: [
    starlight({
      title: 'My Docs',
      plugins: [starlightLlmActions()],
    }),
  ],
});

Per-page opt-out

Add llmActions: false to a page's frontmatter to hide the dropdown there:

---
title: This page disables the actions
llmActions: false
---

Enable the "Save as PDF" action

The PDF action is off by default — the print dialog can still be reached via Cmd/Ctrl+P, and many sites prefer not to advertise PDF as a primary artifact. To show the in-menu button:

starlightLlmActions({
  actions: { printPdf: true },
})

Configuration

For the full configuration reference — including per-provider overrides, the print/PDF snapshot disclaimer, and the markdown URL template — see the configuration docs.

Customization

Using a custom PageTitle override

If your Starlight config already has a custom PageTitle component, the plugin skips its automatic injection and logs a dev-mode warning. Import PageActions directly inside your override instead:

---
import Default from '@astrojs/starlight/components/PageTitle.astro';
import PageActions from 'starlight-llm-actions/components/PageActions.astro';
---

<div style="display: flex; align-items: flex-start; gap: 0.75rem;">
  <Default {...Astro.props}><slot /></Default>
  <PageActions />
</div>

The plugin integration still handles route injection and config resolution — only the UI placement is up to you.

CSS variables

The plugin scopes its styles with a set of --llm-* custom properties on the .sl-llm-actions root element, all defaulting to Starlight design tokens. Override them in your site's custom CSS to retheme without touching internal selectors.

See CSS customization for the full reference.

License

Licensed under the MIT License, Copyright © Holden Hewett.

Icons sourced from Simple Icons under CC0. Brand names and marks remain trademarks of their respective owners and appear nominatively here only to identify the linked services. No endorsement is implied. To use official brand assets, override providers.<name>.icon in your plugin config.

See LICENSE for more information.