Install Compass
Tutorial
In this tutorial, you install Starlight Compass, prepare your content collection, and choose the provider that answers its questions. Then you review your first page.
Prerequisites
Section titled “Prerequisites”A Starlight website. If you don’t have one yet, follow the “Getting Started” guide in the Starlight docs.
Install the plugin
Section titled “Install the plugin”-
Install the package:
Terminal window npm install starlight-compassTerminal window pnpm add starlight-compassTerminal window yarn add starlight-compass -
Extend your content collection schema so that pages can declare their documentation type:
src/content.config.ts import { docsLoader } from "@astrojs/starlight/loaders";import { docsSchema } from "@astrojs/starlight/schema";import { defineCollection } from "astro:content";import { compassSchema } from "starlight-compass/schema";export const collections = {docs: defineCollection({loader: docsLoader(),schema: docsSchema(),schema: docsSchema({ extend: compassSchema() }),}),};
Choose a provider
Section titled “Choose a provider”Compass sends its questions about your pages to a provider, which you add to your Starlight configuration in the next step. Choose the one that fits you:
Set up TypeSafeUse Jev, a model built to answer typed questions with calibrated probabilities. Recommended for audits.
Set up an OpenAI-compatible modelUse OpenAI, OpenRouter, DeepSeek or a local model through the chat completions API.
Need another API? Write your own provider.