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

docus-cloudflare-ai-search

v0.1.2

Published

Replace Docus default search with Cloudflare AI Search

Readme

docus-cloudflare-ai-search

npm version npm downloads License Nuxt pkg.pr.new

Replace the default Docus search with Cloudflare AI Search. Read Bringing Cloudflare AI Search to Docus and VitePress for the story behind the package family.

  • Replaces only the Docus AppSearch component.
  • Queries a public Cloudflare AI Search endpoint from the browser.
  • Keeps the command palette, navigation browsing, keyboard shortcut, and result routing.
  • Stores the five most recently selected results in local storage.

Installation

pnpm add docus-cloudflare-ai-search

Usage

Add the module after Docus and provide the public AI Search endpoint root:

// nuxt.config.ts
export default defineNuxtConfig({
  extends: ['docus'],
  modules: ['docus-cloudflare-ai-search'],
  aiSearch: {
    client: {
      enabled: true,
      endpoint: 'https://search.example.com',
    },
  },
})

When enabled, the module registers a Docus AppSearch replacement. Disable it or omit enabled to retain Docus's default search. An app/components/AppSearch.vue in your application can still override the module component.

The endpoint is required when the client is enabled. Use the public Cloudflare AI Search endpoint root without /search; the module appends that path to browser requests.

Options

export default defineNuxtConfig({
  aiSearch: {
    ui: {
      placeholder: 'Search documentation',
      messages: {
        empty: 'No results found.',
        error: 'Search is temporarily unavailable. Please try again.',
        rateLimit: 'Too many searches. Please try again shortly.',
        recent: 'Recent AI searches',
      },
    },
    client: {
      enabled: true,
      endpoint: 'https://search.example.com',
      debounceMs: 200,
      query: {
        minLength: 2,
        maxLength: 200,
      },
      request: {
        timeoutMs: 8_000,
        retrievalOptions: {
          max_num_results: 10,
        },
      },
    },
  },
})

| Option | Description | | --- | --- | | client.enabled | Enables the Docus AppSearch override. Defaults to false. | | client.endpoint | Required when enabled. Public Cloudflare AI Search endpoint root. | | client.debounceMs | Delay before sending a search request. Defaults to 200. | | client.query.minLength, client.query.maxLength | Browser query-length limits. Overlong queries are truncated. | | client.request.timeoutMs | Browser request timeout in milliseconds. | | client.request.retrievalOptions | Public retrieval and reranking options sent as ai_search_options. Defaults to { max_num_results: 10 }. | | ui.placeholder | Command-palette input placeholder. | | ui.messages | Labels for empty, failed, rate-limited, and recent search states. |

[!WARNING] The endpoint and every client option are sent to the browser. Never include API tokens, Authorization values, Cloudflare Access service-token secrets, or other credentials.

Cloudflare setup

Create an AI Search instance, enable its public /search endpoint, and add your development and production origins to its authorized hosts. Index only content that is safe to expose publicly.

Use cloudflare-ai-search-sync to index Nuxt Content during builds.

Related packages

Sponsors

License

MIT License © 2026-PRESENT Estéban Soubiran