Documentation menuCosine Pro
Cosine Pro
Plugins for Vite, Next.js, Docusaurus, VitePress and Astro, per-language models, and search insights that show what your docs are missing.
Cosine Pro adds what you need once search runs on more than one site: the index builds itself, and you see what people look for and do not find.
| Package | What it does |
|---|---|
@weber-development/cosine-vite | Builds the index in every Vite build (Astro, VitePress, SvelteKit, Nuxt), serves it in dev, rebuilds on change and re-embeds only the sections that changed |
@weber-development/cosine-next | Builds the index from the pages next build has prerendered and keeps the last index in .next/cache, so CI rebuilds embed only what changed |
@weber-development/cosine-migrate | Turns an Algolia DocSearch export and its synonyms into a Cosine index |
@weber-development/cosine-insights | Records searches without tracking people and reports queries without results, results nobody opened, the most searched topics and how they change from period to period |
@weber-development/cosine-answers | Quotes the sentence that answers the question above the results, with a link to the page, without an LLM |
@weber-development/cosine-quality | Golden queries: write down which page must answer which search and let CI fail when a change makes search worse |
@weber-development/cosine-i18n | One index per page language, each with its own model: English pages use the small model, other languages the multilingual one, and visitors download only the model of the language they read |
@weber-development/cosine-docusaurus | Docusaurus plugin and search bar theme: the index per locale, with cache and shards |
@weber-development/cosine-vitepress | VitePress config wrapper and theme that puts the search field in the nav bar |
@weber-development/cosine-astro | Astro integration and Starlight plugin that replaces the built-in search |
Licence and plans
Plans and prices are on packages.sweber.dev/cosine. After cancelling a subscription, the versions you installed keep working; only updates and access to new versions end.
Installation
The packages are delivered through GitHub Packages. After purchase you get read access to the repository Weber-Development/cosine-pro-dist, which contains the full installation guide. In short:
.npmrc
@weber-development:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${COSINE_PRO_TOKEN}
npm i @sweberdev/cosine @huggingface/transformers @weber-development/cosine-insights
npm i -D @weber-development/cosine-vite # or cosine-next for Next.js