# Nimbus > Nimbus is a documentation framework for Astro: docs for humans and agents, in your repo. Index: https://nimbus-docs.com/llms.txt # Quickstart > Run a Nimbus docs site on your machine in five minutes. Source: https://nimbus-docs.com/quickstart/ · Markdown: https://nimbus-docs.com/quickstart/index.md By the end you'll have a docs site running locally, with a page you've edited. ## Prerequisites - Node 22.23.4 or later (`node --version`) ## Steps 1. **Create the site** ```sh npm create @cloudflare/nimbus-docs@latest -- my-docs --yes yarn create @cloudflare/nimbus-docs my-docs --yes pnpm create @cloudflare/nimbus-docs@latest my-docs --yes bun create @cloudflare/nimbus-docs@latest my-docs --yes ``` 2. **Start the dev server** ```sh cd my-docs ``` ```sh npm run dev yarn run dev pnpm run dev bun run dev ``` 3. **Edit the home page** Open `src/content/docs/index.mdx`, change the title, and save. ## You should see ```text astro v ready in ms ┃ Local http://localhost:4321/ ┃ Network use --host to expose ``` Open `http://localhost:4321/`: your site, with your new title and a sidebar. The scaffolder wrote the layouts, components and styles into `my-docs/`, and they're yours to change. [Search](https://nimbus-docs.com/navigation/search) reads an index the build writes, so it answers once you run `npm run build`, then `npm run preview`. ## Next step [Pages and routing](https://nimbus-docs.com/writing/pages-and-routing): add your first real page. Also: [Deploy to Cloudflare](https://nimbus-docs.com/deploy/cloudflare) · [Project structure](https://nimbus-docs.com/project-structure) # Why Nimbus > Some of the opinions behind Nimbus, what we believe documentation should look like in a world where humans and agents are both creators and consumers. Source: https://nimbus-docs.com/why-nimbus/ · Markdown: https://nimbus-docs.com/why-nimbus/index.md Nimbus is a documentation framework for Astro: docs for humans and agents, in your repo. These are the opinions behind it. ## You own all your code Layouts, components, content, styles — every visible piece of your site lives in your repo. The scaffolder writes them once and steps back. From there, the project is yours: edit any file, restructure any directory, change any default. No upstream API to wait on, no opinionated theme to fork around. Coding agents work the same way you do. When nothing important hides behind an import boundary, an agent can reason about the repo far better. [Project structure](https://nimbus-docs.com/project-structure) maps every file. ## Interactive content, fully yours Documentation worth reading often needs to *show* mechanism — how a request flows, how state nests, where a wire docks. Either you adopt a pre-styled component library and inherit its look, or you build the interactive bits from scratch. Nimbus splits the problem. `nimbus-docs/react` ships a headless `` wrapper plus composable hooks — `usePhase`, `useMeasure`, `useTabIndicator`, `useDiagram`. The wrapper owns the things that are tedious to get right: off-screen pausing, reduced-motion respect, keyboard shortcuts, error boundaries, cross-island coordination. It renders nothing visible itself. The smallest meaningful example, a two-step diagram with its code, is on [Diagrams and interactive content](https://nimbus-docs.com/writing/interactive-content). Action bars, tabs, and play/pause controls install on demand into `src/components/react/diagram/` — edit, restyle, or replace freely; the hooks keep working. Sites that never author an interactive card pay nothing. ## Human and agent first Documentation is no longer read only by people, and as a result every Nimbus site ships several machine-readable formats alongside the HTML: - A Markdown version of every page at `//index.md` - A site-level index at `/llms.txt`, naming every page - JSON-LD in every page's head, giving search and agent tools enough structured data to recognise what they're looking at ```text # Nimbus A way to build documentation sites on top of Astro. ## Pages - [Quickstart](https://nimbus-docs.com/quickstart/index.md) - [Why Nimbus](https://nimbus-docs.com/why-nimbus/index.md) - [CLI](https://nimbus-docs.com/cli/index.md) ``` These formats are defaults, not add-ons. The cost of being a dead end on the agent web is real, and it grows. ## Agentic authoring You add components and features with `nimbus-docs add`: - **Components and utilities** are copied into your repo as files, with their dependencies. - **Features** are recipes: Markdown your coding agent reads, adapts to your project, and applies. ```sh npx @cloudflare/nimbus-docs add 404-page yarn nimbus-docs add 404-page pnpm nimbus-docs add 404-page bunx @cloudflare/nimbus-docs add 404-page ``` The split between the two modes is the one question that matters: which kind of change actually wants a coding agent in the loop, and which is better as a file copy. ## Authoring quality is first-class A docs site whose content drifts in quality undermines its own product. Nimbus treats authoring quality the way a code linter treats source — a layered set of validators, each catching a different class of mistake. Pre-build validators run automatically and gate the build only when the issue would actually break the site: - **Config validation** — `defineConfig` is checked for shape and required fields; errors echo the offending value back to you - **Frontmatter schema validation** — Zod-typed schemas catch missing or malformed fields per collection, with editor-friendly error messages - **MDX component validation** — a pre-build content pass catches lowercase usages, unregistered components, and missing imports - **Registry validation** — `src/components.ts` is parsed and checked against actual MDX usage at build time The lint engine adds an on-demand authoring-quality layer. Rules have stable identifiers like `nimbus/single-h1` and `nimbus/bare-url`, configured in `astro.config.ts` alongside the rest of your Nimbus integration. Run `nimbus-docs lint` for human output, `--format json` for diagnostics an agent can read, `--fix` to apply auto-fixes. The build is never gated by lint findings — drafts still render, warnings stay loud but unblocking. ```ts title="astro.config.ts" {6-9} import { defineConfig } from "astro/config"; export default defineConfig({ integrations: [ nimbus(nimbusConfig, { rules: { "nimbus/single-h1": "error", "nimbus/bare-url": "warn", }, }), ], }); ``` ## Readable is the floor Every Nimbus site already ships the formats agents read — a Markdown version of each page, an `llms.txt` index, and structured data in the head. A year ago that set a docs tool apart; today it's table stakes. The interesting line sits further out. *Everyone made docs readable by agents. Nimbus makes docs writable, maintainable, and operable by them — end to end, on a codebase you fully own.* This depends on the first principle on this page. When every file lives in your repo, an agent can change your docs safely, not just read them, because it sees everything it's touching. An agent can scrape a vendor's themed runtime, but it can't rewrite one. That's why features arrive as recipes. When `nimbus-docs add` runs inside a coding agent, it hands over a recipe: check whether the feature is already there, discover the project, confirm a plan, apply it, and *verify the build still passes*. Your agent owns the install from start to finish. ```sh # inside a coding agent, the recipe pipes straight in npx @cloudflare/nimbus-docs add new-version yarn nimbus-docs add new-version pnpm nimbus-docs add new-version bunx @cloudflare/nimbus-docs add new-version ``` ```sh # from a human shell, hand it to the agent of your choice npx @cloudflare/nimbus-docs add new-version --print | claude yarn nimbus-docs add new-version --print | claude pnpm nimbus-docs add new-version --print | claude bunx @cloudflare/nimbus-docs add new-version --print | claude ``` ## Provenance is a primitive The moment agents start drafting pages, the question stops being *can a machine read this* and becomes *who wrote this, and has a human checked it.* Because you own the content collections, the answer lives in the schema you control — provenance is a few `schemaFields` away, not a convention bolted on top. The starter ships one such field. Pages are assumed to be for agents too, so `audience: "human"` marks a page written first for people. You add more fields the same way. This site adds `aiGenerated` for pages an agent drafted and no one has reviewed, and shows an "awaiting review" label until someone signs off: ```ts title="src/content.config.ts" import { z } from "astro/zod"; docsCollection({ schemaFields: { audience: z.literal("human").optional(), aiGenerated: z.boolean().optional(), // shows "awaiting review" until cleared }, }) ``` With the field registered, the origin and review state of every page travel with the page itself: ```yaml title="src/content/docs/new-endpoint.mdx" --- title: New endpoint aiGenerated: true # drafted by an agent — shows "awaiting review" until a human clears it --- ``` Provenance only pays off if drift gets caught. The lint engine emits versioned JSON carrying character-precise fixes that `--fix` applies in place, and the scaffolded `AGENT.md` ships an audit recipe with a fixed diagnostic format — so an agent can sweep the whole site and report back in a shape another tool can parse: ```text - [error] src/content/docs/cli.mdx:42 — broken internal link "/instal" — did you mean "/quickstart"? - [warn] src/content/docs/registry.mdx:8 — link text "here" isn't meaningful out of context. Summary: 1 error, 1 warning. ``` The docs become something an agent can keep correct over time — maintained and operable, not just published — on a repo that's yours, not a vendor's. ## The tree is the truth There's no second config to keep in step with your content. The folders under `src/content/` are both the URLs and the sidebar: move a file and its entry moves, delete it and the entry goes. Frontmatter handles the details, such as order, badges and drafts. The result is a single source of truth for what pages exist. The site can't drift from its own contents, because its contents are the site. ## Versions are just collections Most docs tools bolt versioning on as a special case — parallel filesystems, URL rewrites, custom routing. Nimbus does it with a primitive it already has: multi-collection content. Each version is its own content collection, with the same schema. A `docs-v2/` collection is a v2 site; a `docs-v3/` collection is v3. Routes and sidebars pick up each version independently. The version picker is a thin layer on top. - src/content/ - docs/ - docs-v2/ - docs-v3/ The same primitive handles per-product splits (a `docs-api/` collection sits next to `docs-cli/`). When you need versions, you already have most of what you need; you didn't pay for it earlier. # Migrate to Nimbus > Move an existing docs site to Nimbus with every URL kept: pages, frontmatter, navigation, components, reusable snippets, an OpenAPI reference and redirects, with a coding agent or by hand. Source: https://nimbus-docs.com/migrate/ · Markdown: https://nimbus-docs.com/migrate/index.md If you already have a docs site, most of it moves as it is: Markdown is Markdown, and the rest is a mapping. Every page keeps its URL. A coding agent can do the whole migration with one recipe; by hand it is seven steps. ## What moves | From the old site | In Nimbus | |---|---| | Pages, as Markdown or MDX | `src/content/docs/`, at the paths that keep their URLs | | A navigation file, or a sidebar list in the old config | `sidebar.items` in `astro.config.ts`, same groups and order ([Sidebar](https://nimbus-docs.com/navigation/sidebar)) | | Navigation from folders, with an order in frontmatter | Folders and `sidebar.order`, as before | | Navigation labels, hidden pages, badges | `sidebar.label`, `sidebar.hidden`, `sidebar.badge` ([Frontmatter](https://nimbus-docs.com/reference/frontmatter)) | | Callouts, tabs, steps, cards, accordions, code groups, framed images, file trees | The starter's `Aside`, `Tabs`, `Steps` and `Card`, plus registry components ([Registry](https://nimbus-docs.com/registry)) | | Reusable snippets | Partials, included with `` ([Reusable snippets](https://nimbus-docs.com/writing/reusable-snippets)) | | API pages generated from an OpenAPI file | The [API reference](https://nimbus-docs.com/api-reference), from the same file | | Old URLs that changed | `redirects` in `astro.config.ts` ([Redirects](https://nimbus-docs.com/navigation/redirects)) | | Images and files | `public/`, same paths | | Custom CSS and theme colors | Not translated. The theme is yours to edit in `src/styles/globals.css` ([Theme and tokens](https://nimbus-docs.com/styling/theme-and-tokens)) | Pages in other languages stay out for now; the agent's report lists them. ## What Nimbus does differently - **Components are yours.** The scaffolder copies them into your repo; there is no theme to configure or fork ([Ownership](https://nimbus-docs.com/styling/how-customization-works)). - **Every page has a Markdown twin and a line in `llms.txt`.** Agents read your site without a plugin ([Markdown and llms.txt](https://nimbus-docs.com/ai/publish-markdown)). - **Search is built in.** There is no search provider or key to carry over ([Search](https://nimbus-docs.com/navigation/search)). - **Frontmatter is validated.** An unknown key fails the build instead of being ignored, so the migration surfaces every field it dropped. ## With a coding agent Scaffold a Nimbus site beside the old one, then hand your agent the recipe. It reads the old site as data, writes only into the new one, and ends with a report of everything it could not carry over. ```sh npm create @cloudflare/nimbus-docs@latest -- my-docs --yes --content empty yarn create @cloudflare/nimbus-docs my-docs --yes --content empty pnpm create @cloudflare/nimbus-docs@latest my-docs --yes --content empty bun create @cloudflare/nimbus-docs@latest my-docs --yes --content empty ``` ```sh cd my-docs ``` ```sh npx @cloudflare/nimbus-docs add migrate yarn nimbus-docs add migrate pnpm nimbus-docs add migrate bunx @cloudflare/nimbus-docs add migrate ``` `add` prints the recipe for the agent it detects, or pipe it yourself with `--print`. The recipe is also at [registry/features/migrate.md](https://nimbus-docs.com/registry/features/migrate.md), for an agent that can read a URL. The recipe never runs the old site's scripts and copies no secrets. It carries only same-origin redirects, safe URLs and known asset types, and lists raw HTML, embeds and code instead of copying them. ## By hand 1. **Scaffold a site** ```sh npm create @cloudflare/nimbus-docs@latest -- my-docs --yes --content empty yarn create @cloudflare/nimbus-docs my-docs --yes --content empty pnpm create @cloudflare/nimbus-docs@latest my-docs --yes --content empty bun create @cloudflare/nimbus-docs@latest my-docs --yes --content empty ``` ```sh cd my-docs ``` 2. **Copy the pages** Copy your Markdown and MDX files into `src/content/docs/` at the paths that give them their old URLs: `guides/install.mdx` serves `/guides/install/`. 3. **Rewrite frontmatter** Every page needs a `title`. Map navigation fields to `sidebar.order`, `sidebar.label` and `sidebar.hidden`, drafts to `draft: true`, and remove keys Nimbus doesn't know ([Frontmatter](https://nimbus-docs.com/reference/frontmatter)). The build tells you which. 4. **Rebuild the navigation** If your old site listed its navigation in a file, write the same groups as `sidebar.items`, pages by slug ([Arrange the sidebar by hand](https://nimbus-docs.com/navigation/sidebar#arrange-the-sidebar-by-hand)). If it followed your folders, there is nothing to do. 5. **Map components and snippets** Callouts become `:::tip` directives or `