Documentation menuDocumentation
Cosine documentation
Semantic search for documentation sites that runs entirely in the browser. No search server, no API key, no query leaves the device.
Try the live demoStart
Guides
- Building the indexWhat cosine build reads, how it splits pages and how to run it in CI.
- Models and languagesWhich embedding model to choose for English, German, French or Italian documentation.
- Search fieldThe <cosine-search> web component, its attributes, styling and events.
- ReactThe CosineSearch component and the useCosine / useCosineSearch hooks.
- Privacy and self-hostingWhat leaves the browser, and how to serve the model from your own domain.
Reference
Cosine Pro
- Cosine ProA Vite plugin that builds the index with every build, and search insights that show what your docs are missing.
- Vite pluginBuild the index as part of every Vite build, with a dev server and an embedding cache.
- Search insightsFind out which questions your docs do not answer, without tracking people.