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

docs-expert

v0.2.1

Published

Query any documentation site's AI assistant — CLI + library. Supports Mintlify, GitBook, Fern, ReadMe, Inkeep, Vercel, Stripe, and more.

Readme


CLI + TypeScript library that taps into the AI assistants already embedded in documentation platforms. No API keys, no scraping, no token costs — just answers from the source.

Supports 9 providers out of the box:

| Provider | Flag | Sites | |----------|------|-------| | Auto-detect | <url> <question> | Automatically detects the provider (Mintlify, GitBook, Fern, ReadMe, Inkeep) | | Claude/Anthropic | --claude | Claude Agent SDK, API docs | | Stripe | --stripe | Stripe docs | | Vercel | --vercel | Vercel docs | | Better Auth | --better-auth | Better Auth docs | | GitBook | --gitbook <url> | Any GitBook-powered site | | Fern | --fern <url> | 150+ sites (OpenRouter, Square, ElevenLabs, ...) | | ReadMe | --readme <url> | Any ReadMe-powered site | | Inkeep | --inkeep <url> | Any Inkeep-powered site (Clerk, ...) — auto-detects API key |

  ──────────────────────────────────────────────────────
  ▸ docs-expert /// v0.1.0
  query any documentation site's AI assistant
  ──────────────────────────────────────────────────────

  ■ Done.

  // ANSWER ────────────────────────────────────────────

  Metronome is a billing platform that transforms your
  customers' usage into precise, tailored invoices...

  // SOURCES ───────────────────────────────────────────

  01 How Metronome works
     https://docs.metronome.com/guides/get-started/how-metronome-works

Install

npm install -g docs-expert

CLI

# Auto-detect provider and query (works with any supported site)
docs-expert https://docs.metronome.com "What is Metronome?"
docs-expert https://clerk.com/docs "How do I protect API routes?"
docs-expert https://openrouter.ai/docs "What models are available?"

# Query Claude/Anthropic docs
docs-expert --claude "How do I use the Agent SDK?"

# Query Stripe docs
docs-expert --stripe "How do I create a payment intent?"

# Query Vercel docs
docs-expert --vercel "How do I deploy a Next.js app?"

# Query Better Auth docs
docs-expert --better-auth "How do I set up email and password auth?"

# Query any GitBook site
docs-expert --gitbook https://docs.gitbook.com "How do I create a space?"

# Query any Fern site
docs-expert --fern https://openrouter.ai/docs "What models are available?"

# Query any ReadMe site
docs-expert --readme https://docs.readme.com "How do I set up API docs?"

# Query any Inkeep-powered site (auto-detects API key)
docs-expert --inkeep https://clerk.com/docs "How do I protect API routes?"

# JSON output
docs-expert --claude --json "What is the Agent SDK?"

# Interactive mode
docs-expert

Library

import { ask, askStream, askClaudeDocs, askStripeDocs, askFernDocs, askVercelDocs, resolveProvider } from "docs-expert";

// Auto-detect provider
const { provider } = await resolveProvider("https://clerk.com/docs");
// provider === "inkeep"

// Mintlify (any site)
const response = await ask("https://docs.metronome.com", "What is Metronome?");
console.log(response.content);
console.log(response.searchResults);

// Claude docs
const claude = await askClaudeDocs("How do I use tools?");

// Stripe docs
const stripe = await askStripeDocs("What is a payment intent?");

// Fern docs (any site)
const fern = await askFernDocs("https://openrouter.ai/docs", "What models are available?");

// Vercel docs
const vercel = await askVercelDocs("How do I deploy?");

Streaming

import { askStream } from "docs-expert";

for await (const event of askStream("https://docs.notte.cc", "What is Notte?")) {
  if (event.type === "text") process.stdout.write(event.text);
  else if (event.type === "done") console.log("\nSources:", event.response.searchResults);
}

Stateful client (multi-turn)

import { createClient } from "docs-expert";

const client = createClient("https://docs.metronome.com");
const r1 = await client.ask("What is Metronome?");
const r2 = await client.ask("How do I set up billing?"); // has conversation context
client.clearHistory();

MCP Server

docs-expert ships as an MCP server, so any MCP-compatible host (Claude Desktop, Cursor, Claude Code, etc.) can query documentation directly.

Tools exposed:

| Tool | Description | |------|-------------| | ask_docs | Query any docs site (auto-detects provider from URL) | | ask_mintlify_docs | Query any Mintlify-powered site | | ask_fern_docs | Query any Fern-powered site | | ask_gitbook_docs | Query any GitBook-powered site | | ask_readme_docs | Query any ReadMe-powered site | | ask_inkeep_docs | Query any Inkeep-powered site | | ask_claude_docs | Query Claude/Anthropic docs | | ask_stripe_docs | Query Stripe docs | | ask_vercel_docs | Query Vercel docs | | ask_better_auth_docs | Query Better Auth docs |

Claude Desktop config (claude_desktop_config.json):

{
  "mcpServers": {
    "docs-expert": {
      "command": "docs-expert-mcp"
    }
  }
}

Claude Code (.mcp.json):

{
  "mcpServers": {
    "docs-expert": {
      "command": "docs-expert-mcp"
    }
  }
}

How it works

docs-expert reverse-engineers the AI assistants that documentation platforms embed in their sites. Each provider has its own API pattern:

  • Mintlify — SSE streaming via leaves.mintlify.com, auto-detects subdomain from page HTML
  • Inkeep (Claude, Clerk, etc.) — SHA-256 challenge-response auth, OpenAI-compatible chat completions API
  • Stripe — Polling-based API at ai.stripe.com, creates threads and polls for responses
  • GitBook — Next.js Server Actions with RSC streaming, dynamically discovers action hash from JS bundles
  • Fern — SSE streaming at /api/fern-docs/search/v2/chat, zero auth
  • ReadMe — Non-streaming JSON at /{subdomain}/chatgpt/ask, zero auth
  • Vercel — SSE streaming at /api/ai-chat, Vercel AI SDK protocol
  • Better Auth — SSE streaming at /api/docs/chat, Vercel AI SDK protocol

No API keys required. No scraping. No LLM costs. Just the built-in AI that's already there.

Disclaimer

This package is not affiliated with, endorsed by, or associated with any of the documentation platforms it supports.

docs-expert interacts with publicly accessible AI assistant endpoints — the same ones used by the chat widgets embedded on documentation sites. No authentication is bypassed, no private data is accessed, and no rate limiting is circumvented.

This is an independent open-source project built for developer convenience. Use it responsibly and in accordance with the terms of service of the documentation sites you query. The authors assume no liability for misuse.

License

MIT — see LICENSE for details.