docmd-searchv0.1.6 223k+ installs

Search that understands meaning.
Runs in the browser. Completely private.

Offline semantic search for any documentation site. Understands meaning, runs entirely in the browser, and never sends data to the cloud.

Get Started
Local Vector Engine 100% Private Quantised Index Zero Cloud Costs
user authentication
⌘K
User Authentication & Sessions
/getting-started/security
98% match
Configure how your application handles user login, secure cookies, token generation, and stateless session verification.
OAuth & Single Sign-On (SSO)
/plugins/auth-providers
92% match
Authenticate documentation access through GitHub, Google, and enterprise OAuth SAML providers.
Route Guards & Private Docs
/configuration/routing
86% match
Define private directories and redirect configurations for unauthenticated guest sessions trying to access protected paths.

How it works

Smart search for static documentation, with no servers or third-party services required.

Runs Locally in the Browser

Uses lightweight AI models that execute directly in the browser. No data ever leaves your users' devices.

Int8 Quantised Vectors · Zero Telemetry · <3 KB Client

Understands What You Mean

Goes beyond exact keyword matching. Searching for 'authentication' also finds results about 'sign-in', 'login', and 'sessions'.

Dense 384-Dim Embeddings · Cosine Similarity Re-ranker

Hybrid Keyword + Semantic

Combines fast keyword matching with meaning-aware similarity scoring for the most relevant results, instantly.

BM25 Lexical + Cosine Vector Fusion · Typo-Tolerant

How docmd-search compares

Client-side AI vector search vs traditional cloud APIs and static keyword engines.

Capability docmd Search Algolia / Cloud Search Pagefind / Lunr
Semantic Understanding
Finds concepts by meaning, not just exact keyword strings
Dense Vector AI NeuralSearch (Enterprise) Keyword / Lexical Only
Infrastructure & Monthly Bill
Ongoing hosting, vector DB, or API query subscription costs
$0 / Forever Free Usage-Based / $$$ Contract $0 / Forever Free
Offline & Air-Gapped Operation
Runs on intranets, offline PWA, local dev without internet
100% Offline Requires Internet 100% Offline
User Privacy & Data Residency
Where queries are processed and logged
Zero Data Sent Queries Logged to Cloud Zero Data Sent
Search Latency
Response speed per typed keystroke
< 1ms (In-Memory) 50–250ms (Network) < 5ms (In-Memory)

Choose your search model

Pick the model that fits your documentation size and language requirements.

Model Dimensions Size Languages Best For
Multilingual MiniLM L12 384 ~118 MB 50+ languages i18n documentation
Multilingual E5 Small 384 ~118 MB 100+ languages Wide language coverage
Multilingual MPNet Base 768 ~270 MB 50+ languages Best multilingual quality

💡 Multilingual documentation: If your documentation website contains multiple languages (such as English, Chinese, German, Spanish, etc.), select a multilingual model using docmd-search --settings. The default model is English-only and will produce poor search relevance for other languages.

Use it anywhere: the client API

A lightweight client runtime (<3 KB gzipped) that runs entirely in the browser. Build custom search UIs for any website or application.

Under 3 KB Gzipped

Pure lightweight JavaScript. No WASM, no model downloads, zero third-party dependencies.

Progressive Batch Streaming

Batch 0 loads instantly for immediate search while remaining chunks stream in background.

Framework Agnostic

Drop into React, Vue, Next.js, Astro, or static HTML. Full TypeScript definitions included.

100% Local Privacy

Evaluates queries in device memory with zero telemetry. Fully compliant with strict GDPR policies.

search-client.ts
import { load, search } from 'docmd-search/client';

// 1. Initialise index (batch 000 loads instantly, rest stream in background)
await load('/_docmd-search', (loaded, total) => {
  console.log(`Loaded batch ${loaded}/${total}`);
});

// 2. Query search with hybrid vector + keyword scoring (<1ms)
const results = search('authentication secure routes', 5);
results.forEach(({ score, chunk }) => {
  console.log(`[${Math.round(score * 100)}%] ${chunk.file}#${chunk.heading || ''}`);
});
Console Output
[0.3ms] [98%] /getting-started/security#authentication
[0.4ms] [92%] /plugins/auth-providers#oauth-sso
Using docmd? Enable semantic search directly in docmd.config.json under "plugins": { "search": { "semantic": true } } – no custom JavaScript required.

Frequently asked questions

Common questions about docmd-search and offline semantic search.

Does it run entirely in the browser?
Yes. All search happens directly in your users' browsers. No cloud infrastructure, no search API, and no data ever leaves the device.

Read the full documentation →
Do users need to download AI models?
No. The AI models are only used at build time on your machine to generate pre-computed search indices. Users' browsers only download the resulting index files – small, compressed JSON chunks.

Learn how offline search works →
Does it work with multiple languages?
Yes. For multilingual documentation, choose a multilingual model such as paraphrase-multilingual-MiniLM-L12-v2, which supports over 50 languages. The default model is English-only.

Configure multilingual search →
What is the confidence score badge?
When enabled, the showConfidence setting displays a percentage badge next to each search result showing how closely it matches the query. This helps users quickly judge which results are most relevant.

Read about browser client settings →

Start building in minutes

Open source, MIT licensed. One command to your first documentation site.