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

@mastra/docusaurus-plugin-kapa

v1.2.1

Published

Kapa.ai assistant plugin for Mastra's Docusaurus sites

Readme

@mastra/docusaurus-plugin-kapa

Kapa.ai assistant plugin for Docusaurus. Adds an AI-powered chatbot sidebar to your documentation site, using Kapa's SDK to answer questions based on your docs.

Installation

npm install @mastra/docusaurus-plugin-kapa

Also install the required peer dependencies:

npm install @docusaurus/theme-common @docusaurus/types clsx lucide-react react react-dom

Usage

1. Register the plugin

Add it as a theme (not a plugin) in docusaurus.config.ts:

import type { Config } from '@docusaurus/types'
import type { KapaPluginOptions } from '@mastra/docusaurus-plugin-kapa'

const config: Config = {
	themes: [
		[
			'@mastra/docusaurus-plugin-kapa',
			{
				integrationId: process.env.KAPA_INTEGRATION_ID,
				groupId: process.env.KAPA_GROUP_ID, // Optional
			} satisfies KapaPluginOptions,
		],
	],
}

export default config

2. Wire up in src/theme/Root.tsx

The plugin provides theme components but does not inject its own Root.tsx. You must wrap your app with DocsChatProvider in your site's Root.tsx:

import type { ReactNode } from 'react'
import { DocsChatProvider } from '@mastra/docusaurus-plugin-kapa/client'

function KapaWrapper({ children }: { children: ReactNode }) {
	return <DocsChatProvider>{children}</DocsChatProvider>
}

export default function Root({ children }: { children: ReactNode }) {
	return <KapaWrapper>{children}</KapaWrapper>
}

3. Edit your styles.css

Add the required @import statements to your styles.css:

@import '@mastra/docusaurus-plugin-kapa';

4. Add a navbar toggle (optional)

Register DocsChatToggle as a custom navbar item. In your NavbarItem/ComponentTypes.tsx:

import { DocsChatToggle } from '@mastra/docusaurus-plugin-kapa/client'
import OriginalComponentTypes from '@theme-original/NavbarItem/ComponentTypes'

export default {
	...OriginalComponentTypes,
	'custom-kapaChat': DocsChatToggle,
}

Then add it to your navbar config when the Kapa theme is enabled:

const ENABLE_KAPA = Boolean(process.env.KAPA_INTEGRATION_ID)

export default {
	themeConfig: {
		navbar: {
			items: [
				...(ENABLE_KAPA
					? [{ type: 'custom-kapaChat', position: 'right' as const }]
					: []),
			],
		},
	},
}

Options

| Option | Type | Required | Description | | --------------- | -------- | -------- | ------------------------------------------------------------ | | integrationId | string | Yes | Your Kapa.ai integration ID | | groupId | string | No | Kapa source group ID for filtering which docs are searchable |