# Starlight — card for AI agents

Astro's documentation-site template: navigation, search, i18n, dark mode out of the box.

Category: Page and site templates · maker Astro · checked 2026-11-05 · style: minimal

## Price
- Price: Free
- Free tier: Fully free.

## License
MIT — https://raw.githubusercontent.com/withastro/starlight/main/LICENSE

- commercial: **yes** (Commercial use OK)
  > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software
  (https://raw.githubusercontent.com/withastro/starlight/main/LICENSE)
- attribution: **no** (No credit needed)
  > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
  (https://raw.githubusercontent.com/withastro/starlight/main/LICENSE)
- in app: **yes** (Can ship inside your app)
  > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software
  (https://raw.githubusercontent.com/withastro/starlight/main/LICENSE)
- redistribute: **yes** (Can pass the files on to your own users)
  > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software
  (https://raw.githubusercontent.com/withastro/starlight/main/LICENSE)

## Rules to follow
- Keep the MIT copyright notice in the code if you redistribute it.
- No visible credit on the site is required by the licence.

## Can an AI agent use it by itself?
**Yes** · package: Agent installs a package or loads it from a CDN

## How an agent gets files
- npm create astro@latest -- --template starlight; no account. (sign-in: none)
- Formats: mdx, astro
- Not allowed: Needs Node.js

## How to connect
- Package (npm/PyPI)
- npm: `npm install @astrojs/starlight`
- Repository: https://github.com/withastro/starlight
- Website: https://starlight.astro.build

## Numbers (AgentGid data)
- Gid Score: 49
- GitHub stars: 9,605
- Downloads last week: 2,350,184
- Used in 4 public projects set up for AI coding agents

## Lines to paste into your prompt or AGENTS.md

```
- Starlight (Page and site templates). Astro's documentation-site template: navigation, search, i18n, dark mode out of the box. Price: free; commercial use OK; no credit needed. Style: minimal.
  Connect: npm @astrojs/starlight.
  Get files: npm create astro@latest -- --template starlight; no account (mdx, astro).
  Not allowed: Needs Node.js
  Rule: Keep the MIT copyright notice in the code if you redistribute it.
  Rule: No visible credit on the site is required by the licence.
  License: https://raw.githubusercontent.com/withastro/starlight/main/LICENSE (checked 2026-11-05; details: https://agentgid.com/assets/starlight/)
```

## Links
- AgentGid page: https://agentgid.com/assets/starlight/
- Is it free for commercial use? https://agentgid.com/assets/starlight/commercial-use/
- Source: https://starlight.astro.build
- Source: https://github.com/withastro/starlight
- Source: https://raw.githubusercontent.com/withastro/starlight/main/LICENSE


## Starlight: a ready documentation website from Markdown files

Starlight is a free, ready-made design and engine for documentation websites, made by the team behind the Astro website builder. You write pages as simple Markdown text files, and Starlight turns them into a site with a side menu, search, dark mode and language switching. It needs Node.js to build the site; the finished site is plain web pages you can host anywhere.

### Where to use it
- Documentation for your product: Start a separate help or docs website for an app, a library or a service. You write text files, and the menu, search and page layout are already done.
- A docs section on an existing site: If your website is already built with Astro, add a documentation part to it instead of running a second site on another address.
- Help pages in several languages: Publish the same help pages in English, Chinese, Arabic or other languages, with a language menu. Pages not yet translated show the main language instead, and right-to-left scripts are supported.
- Search with no extra service: Visitors can search all your pages from the header. The search is built into the site itself, so there is no search company to sign up with.
- A front page for the docs: Give the docs a wide welcome page without the side menu, with a big heading and buttons, like the Starlight home page itself.
- An internal team handbook: Keep company rules, how-tos and onboarding notes as text files next to your code, and publish them as a searchable site for the team. (idea, not from the official pages)

### How to start
- Create a new project from the Starlight template. You need Node.js 22.23.4 or newer for the current Astro.

```
npm create astro@latest -- --template starlight
```

- Start the local preview, then add pages as Markdown files in src/content/docs/.

```
npm run dev
```

- For an Astro site you already have, add Starlight to it instead of starting a new project.

```
npx astro add starlight
```


### License
MIT license: free to use for personal and paid projects, and you may change and share the code. When you share copies of Starlight's code, keep its copyright and license notice; the site you publish needs no visible credit.

### Good to know
- Starlight is still marked as beta and changes often. Pin its version and read the change list before updating.
- Building the site needs Node.js 22.23.4 or newer; odd versions such as 23 are not supported by Astro.
- The Astro build tool sends anonymous usage data to the Astro team by default. You can turn this off with one setting.
- Search works on the built site. Build the site first, then try the search box.
- No account or key is needed. The docs pages are ready-made files, so any static hosting can serve them.

Checked 2026-11-09 against: https://starlight.astro.build/, https://starlight.astro.build/getting-started/, https://starlight.astro.build/manual-setup/, https://starlight.astro.build/guides/site-search/, https://starlight.astro.build/guides/i18n/, https://starlight.astro.build/guides/sidebar/, https://starlight.astro.build/guides/customization/, https://starlight.astro.build/guides/pages/, https://starlight.astro.build/guides/overriding-components/, https://starlight.astro.build/environmental-impact/, https://starlight.astro.build/resources/showcase/, https://github.com/withastro/starlight, https://github.com/withastro/starlight/blob/main/LICENSE, https://github.com/withastro/starlight/blob/main/packages/starlight/README.md, https://registry.npmjs.org/@astrojs/starlight/latest, https://registry.npmjs.org/astro/latest, https://docs.astro.build/en/install-and-setup/, https://docs.astro.build/en/guides/deploy/, https://astro.build/telemetry/

### Mistakes to avoid
- Don't: Adding @astrojs/starlight to astro.config.mjs only and expecting pages in src/content/docs/ to show up → Do: Also create src/content.config.ts with a docs collection that uses docsLoader() and docsSchema() (Starlight reads pages through Astro content collections; the create-astro template sets this up, a manual setup does not.)
- Don't: Testing the header search in npm run dev and concluding it is broken → Do: Run npm run build (and preview the build) before checking search (The search index is made at build time.)
- Don't: Expecting a sitemap without setting the site address → Do: Set site: 'https://your-domain' in astro.config.mjs (Starlight only generates the sitemap when it knows the site URL.)
- Don't: Leaving the Starlight version floating (^0.x) and updating Astro on its own → Do: Pin @astrojs/starlight exactly and update Starlight and Astro together with npx @astrojs/upgrade (It is beta software with frequent releases, and it requires a matching Astro version.)
- Don't: Deploying a server-rendered Starlight site to Cloudflare without extra settings → Do: Add the nodejs_compat compatibility flag to the Wrangler configuration (The Starlight docs name this flag for the Cloudflare adapter.)

### Questions
- Do I need to know how to code? You write pages as Markdown text files in src/content/docs/; the menu, search and dark mode come ready. Setting it up and building it needs Node.js, which an AI assistant can run for you.
- Does search need a paid service? No. Search is built in with Pagefind and needs no setup. Algolia DocSearch is an optional replacement through an official plugin.
- Can I add it to the Astro site I already have? Yes. Run npx astro add starlight, add the docs collection, and put the docs in a subfolder if they should live under a path such as /guides/.
- Can I change how it looks? Yes. Add your logo, use CSS and settings, and for bigger changes replace Starlight's own parts with your components.
- Can I use it for a paid product's docs? Yes. It is MIT licensed, so paid and commercial use is allowed.

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
