@cloudflare/nimbus-docs

中文文档
0.19.4发布于 2026/11/06MITTypeScriptES Module构建来源已验证近 30 天下载 19.5万

Docs, for humans and agents

原始使用文档
文档目录8 节
  1. The integration
  2. The CLI
  3. Add to your site
  4. Check your pages
  5. Keep up with Nimbus
  6. Imports
  7. Documentation
  8. License

@cloudflare/nimbus-docs

The Astro integration and CLI for Nimbus, an authoring tool for docs.

Create a site with the scaffolder, which installs and configures this package:

npx @cloudflare/create-nimbus-docs@latest my-docs

The integration

New sites call nimbus(config) in astro.config.ts. The integration processes MDX, validates config and content during the build, indexes search, and provides the helpers your routes call. The scaffolder copies content collections, routes, layouts and UI components into your repo. Shared components such as NimbusHead and Icon come from this package.

The CLI

Run commands inside a site with npx nimbus-docs <command>.

Add to your site

add copies components and their dependencies into your repo as source. Features are Markdown recipes: a coding agent running the command receives the recipe directly, and --print writes it out for any agent, or for you to follow.

npx nimbus-docs add tabs
npx nimbus-docs add new-version --print

add alone lists the registry. add source github --print or add source notion --print prints the guide for loading pages from another repository or from Notion. add adapter-<cloudflare|netlify|vercel|node> installs and configures a server adapter.

Check your pages

check finds problems without building. lint catches authoring mistakes; build the site once first, so it has the link map. Both take --fix. check --json and lint --format json give an agent findings it can act on.

npx nimbus-docs check
npx nimbus-docs lint --fix

Keep up with Nimbus

Review upstream changes before updating the starter files copied into your repo. outdated lists starter files, components and package changes that are behind. diff <file> shows a starter file's upstream change, and --apply takes it when you haven't edited the file. migrate applies the edits a new version needs and lists the ones to review.

npx nimbus-docs outdated
npx nimbus-docs migrate

A site created before nimbus.json existed starts with npx nimbus-docs init.

Imports

ImportFor
@cloudflare/nimbus-docsnimbus() and defineConfig
@cloudflare/nimbus-docs/runtimePage data in your routes: sidebar, breadcrumbs, previous and next
@cloudflare/nimbus-docs/contentContent collections
@cloudflare/nimbus-docs/clientBrowser behaviour for your components
@cloudflare/nimbus-docs/reactHeadless interactive diagrams

The package API covers the helpers you'll use most; the TypeScript declarations list every export.

Documentation

nimbus-docs.com, with the full CLI reference at nimbus-docs.com/cli.

License

MIT

版本与发布记录

@cloudflare/nimbus-docs 共发布 29 个版本,首次发布于 2026/07/17;过去 12 个月发布了 29 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.19.4latest2026/11/063 天前
0.19.32026/11/054 天前
0.19.22026/11/028 天前
0.19.12026/10/2614 天前
0.19.02026/10/2318 天前
0.18.12026/10/1426 天前

关于 @cloudflare/nimbus-docs 的常见问题

@cloudflare/nimbus-docs 是什么?

Docs, for humans and agents

如何安装 @cloudflare/nimbus-docs?

在项目目录运行 npm install @cloudflare/nimbus-docs,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:astro(>=7.2.6 <8.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。它还提供命令行工具 nimbus-docs,可以用 npx nimbus-docs 直接运行。

@cloudflare/nimbus-docs 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@cloudflare/nimbus-docs 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@cloudflare/nimbus-docs 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.12.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@cloudflare/nimbus-docs 可以商用吗?

@cloudflare/nimbus-docs 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@cloudflare/nimbus-docs 的下载量有多少?

根据 npm 官方下载统计,@cloudflare/nimbus-docs 在 2026/10/10 – 2026/11/08 这 30 天内被下载 194,822 次,日均约 6,494 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@cloudflare/nimbus-docs 还在维护吗?

最新版本 0.19.4 发布于 2026/11/06(3 天前);至今共发布 29 个版本,其中过去 12 个月发布了 29 个;首次发布于 2026/07/17。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。