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

@rapidoc/starlight

v0.2.0

Published

RapiDoc for Starlight: OpenAPI reference pages inside your Starlight docs, with the operations in the sidebar

Readme

@rapidoc/starlight

Adds API reference pages to a Starlight site. Each OpenAPI document becomes a page drawn by RapiDoc, inside Starlight's own layout, with the API's tags and operations in Starlight's sidebar.

npm install @rapidoc/starlight
// astro.config.mjs
import { defineConfig } from "astro/config";
import starlight from "@astrojs/starlight";
import starlightRapidoc from "@rapidoc/starlight";

export default defineConfig({
  integrations: [
    starlight({
      title: "My docs",
      plugins: [starlightRapidoc({ uiPath: "/api", spec: "./openapi.yaml" })],
    }),
  ],
});

The reference is at /api. The sidebar gets a group named after the API, with an overview link and a link for every operation, grouped by tag. Each operation shows its HTTP method (GET, POST, DEL) in RapiDoc's colours, and deprecated operations are struck through.

What you get

  • Starlight's layout: its header, sidebar, search and theme switch stay; RapiDoc's own header and sidebar are off.
  • The site's colours: the reference follows Starlight's light and dark themes and sits on its background.
  • One page per API: an operation link is a section of that page (/api/#list-pets), so moving between operations does not reload it.
  • No request for the spec: the document is read at build time and written into the page.
  • Try it and OAuth: the console works as in RapiDoc; the OAuth return page is built at {uiPath}/oauth-receiver/.

Options

| Option | Default | | | :-------- | :-------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | uiPath | required | URL path of the reference page within the site, for example /api. path is its old name, still read | | spec | required | The OpenAPI document: a JSON or YAML file (relative to the project root), a URL, or the object. Whichever it is, it is read when the site is built and written into the page; the browser makes no request for it | | title | the document's info.title | Page title | | label | the title | Sidebar group label | | options | | Attributes of <rapi-doc>, in kebab-case or camelCase: { allowTry: false, theme: "jade" }. They win over the plugin's own | | sidebar | | false adds nothing to the sidebar (link to the page yourself). { collapsed: true } starts the tag groups collapsed. { methods } sets how each operation's HTTP method is shown: "as-colored-text" (default), "as-plain-text", "as-colored-block", or false for no method. Deprecated operations are struck through either way |

For several APIs, pass { apis: [{ uiPath, spec }, { uiPath, spec }] }.

The sidebar group is added after your own sidebar entries. If your config has no sidebar, Starlight generates one from your files; adding the API group replaces that generated sidebar, so list your pages in sidebar too, for example with { label: "Guides", autogenerate: { directory: "guides" } }.

Notes

  • The plugin sets render-style="focused", show-header="false", show-side-nav="false", auto-height="true" and color-scheme="auto". Change any of them through options.
  • API pages are not in the site search (Pagefind): their content is drawn in the browser.
  • Starlight 0.32 or later; Astro 5 or later. MIT.

Part of the RapiDoc family of open-source tools for OpenAPI and Arazzo: RapiDoc (<rapi-doc>), RapiFlow, RapiDoc Portal, RapiMock, RapiPdf, the RapiDoc CLI and integrations for Express, Fastify, Hono, FastAPI, ASP.NET Core, Go, Starlight, VitePress and Docusaurus.