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

@docubook/plugin-search-algolia

v0.1.3

Published

Algolia DocSearch for DocuBook Flame — keyword search in the DocSearch dialog and Ask AI in its own side panel.

Readme

@docubook/plugin-search-algolia

Algolia DocSearch v5 for DocuBook Flame.

  • Search opens the DocSearch dialog with keyword results only, from Flame's sidebar search bar, the mobile search icon, or ⌘ K / Ctrl K.
  • Ask AI (optional) opens the DocSearch side panel, a separate surface, from a Sparkles button beside the sidebar search bar, an Ask AI row in the mobile menu drawer, or ⌘ I / Ctrl I.

The dialog and panel use your Flame theme colors and follow the light/dark toggle. DocSearch is served from your own domain and downloaded only when a reader first reaches for search.

Install

npm install -D @docubook/plugin-search-algolia
{
  "plugins": [
    ["@docubook/plugin-search-algolia", {
      "appId": "YOUR_APP_ID",
      "apiKey": "YOUR_SEARCH_ONLY_API_KEY",
      "indexName": "YOUR_INDEX_NAME",
      "askAi": "YOUR_AGENT_ID"
    }]
  ]
}

Leave out askAi for search only. Use a search-only API key, never the Admin key.

Options

| Option | Type | Description | | --- | --- | --- | | appId | string | Required. Algolia application ID. | | apiKey | string | Required. Search-only API key. | | indexName | string | Required. Index the crawler writes to. | | askAi | string | object | Agent Studio agent ID, or { agentId, appId?, apiKey?, indices?, searchParameters?, suggestedQuestions?, variant?, side?, width?, expandedWidth?, translations? }. | | searchParameters | object | Algolia search parameters for the dialog. | | placeholder | string | Search input placeholder. | | maxResultsPerGroup | number | Maximum results per group. | | disableUserPersonalization | boolean | Do not store recent and favorite searches. | | translations | object | DocSearch modal translations. | | relativeUrls | boolean | Default true: open results on the current origin rather than the crawled one. |

Full guide, including the crawler configuration: Algolia search.

How it works

The plugin declares a search provider on docs pages (see Search providers) and copies its browser build into Flame's bundle directory (assets/docsearch/). Flame keeps rendering the search bar and buttons and imports docsearch/client.js on first use. That module mounts @docsearch/js/docsearch (the keyword-only entry) and @docsearch/sidepanel-js, each loaded when first opened, with DocSearch's own buttons and shortcuts turned off.

Requires @docubook/flame with search provider support (DevServerContext.assetsPath).

On Flame versions with split-workspace support, Ask AI docks in its own box beside the documentation at desktop widths (1024px and above). The document keeps its own box and scroll position, and its TOC becomes evenly spaced dots with heading titles on hover or keyboard focus. Each dot navigates to a section, and the active section is highlighted. Use the panel's expand/collapse button to adjust its width; the document automatically shares the available space. On narrower screens Ask AI fills the viewport. Closing it restores the document and full TOC. The variant option remains a fallback for hosts without this layout support.

On narrow desktops, the compact rail's navigation button explicitly closes Ask AI and reveals the full sidebar, moving focus into the visible navigation. On mobile, opening Flame's navigation drawer dismisses search and Ask AI. Opening search or Ask AI while navigation is open returns to that surface, so only one overlay stays active.

Development

pnpm --filter @docubook/plugin-search-algolia build   # dist/index.js + dist/client/
pnpm --filter @docubook/plugin-search-algolia test