CLI 目录 横向对比 FCRS-1.0 标准 /llms.txt
← 返回 CLI 目录

Antora

$ antora 官方出品 低风险
Antora · 设计与文档排版 · MPL-2.0 · macos / linux / windows

Antora(antora)可按 antora-playbook.yml 聚合多个 Git 仓库及分支/标签中的 AsciiDoc 内容,生成统一的版本化静态文档门户。它原生提供 --log-format json、--log-failure-level warn 与 --fetch 参数,方便 CI 与 Agent 进行确定性校验。

FCRS-1.0 综合评分
84 /100
良好 (Good)
中置信度 (源码/文档)
零摩擦安装命令
npm install @antora/cli
CLI vs MCP 选型建议 仅 CLI 可用

克隆/读取多仓库 Git 分支并编译跨组件 AsciiDoc 交叉引用需通过 antora 在构建主机本地完成。

Agent 友好度体检单

✓ 原生 JSON 输出
— 字段裁剪
✓ 无头非交互
— 支持 Dry-Run
— 只读模式开关
— 支持 NO_COLOR
✓ 自省/Schema 发现
— 官方 SKILL.md

当前为静态评估(本机尚未安装或尚未运行探针)。可在本地运行 npm run data:probe 并提交 data/probes/ 升级为实测证据。

FCRS-1.0 六维评分拆解

Agent 友好度 21 / 25

支持 --log-format json(管道输出时自动启用)、--log-level、--log-failure-level 与 --to-dir,全程无交互。

  • Native --log-format json NDJSON logging
  • --log-failure-level warn enforces strict CI failure on broken xrefs
安全与权限边界 21 / 25

仅在本地输出静态站点文件;构建时会拉取 antora-playbook.yml 配置的 Git 仓库及扩展包。

  • Local site output only; fetches remote Git content sources defined in playbook
安装与运行摩擦 13 / 15

标准 Node.js npm 包(@antora/cli 与 @antora/site-generator),支持 macOS、Linux 与 Windows。

  • Cross-platform npm / npx distribution
能力覆盖与边际价值 12 / 15

专为跨仓库、多版本的企业级 AsciiDoc 文档门户设计,但初期配置比单仓库工具更重。

  • Native Git branch/tag content aggregation and cross-component xrefs
维护与来源背书 9 / 10

Antora 官方项目(OpenDevise / Asciidoctor 生态),基于 MPL-2.0 协议活跃维护。

  • Official Antora ecosystem maintenance
文档与可验证性 8 / 10

docs.antora.org 提供详尽的 CLI 与日志参数文档。

  • Official docs at docs.antora.org/antora/latest/cli/

安全边界、鉴权与放权指南

鉴权方式
无需鉴权 环境变量密钥 本地配置文件
凭证存储位置

公开 Playbook 无需认证;拉取私有 Git 仓库时读取 GIT_CREDENTIALS、.netrc 或本地 SSH 密钥。

潜在副作用
只读查询 本地写入
费用与配额提示

100% 免费开源(MPL-2.0)。

可复制到 CLAUDE.md / AGENTS.md 的安全护栏
# Antora Agent Rules
- Always pass `--log-format json --log-failure-level warn` so broken cross-repo xrefs emit structured JSON errors and fail the build.
- Omit `--fetch` during local iterative checks if cached Git mirrors are already up to date.
- Review remote Git source URLs and `GIT_CREDENTIALS` scope before running untrusted playbooks.

Agent 高频安全命令配方

只读查询(安全推荐)

查看 Antora CLI 与生成器版本
npx antora --version

输出已安装的 @antora/cli 与站点生成器版本,不运行 Playbook。

受控写入与预演

构建多仓库 AsciiDoc 门户并输出 JSON 日志
npx antora --log-format json --log-failure-level warn antora-playbook.yml

将 Playbook 编译至 build/site/,输出 NDJSON 日志,并在出现警告或断链时返回失败退出码。

核心优势

  • + 结构化 --log-format json(NDJSON)日志配合 --log-failure-level warn 可精准捕获跨仓库断链。
  • + 原生擅长聚合多个 Git 仓库和分支/标签的版本化 AsciiDoc 组件。

注意事项与踩坑点

  • ! 需同时配置 @antora/cli、@antora/site-generator、antora-playbook.yml 及 UI 主题包。
  • ! 构建远程 Playbook 时除非使用本地工作树或缓存镜像,否则需要 Git 网络访问。

已验证兼容的 Agent 宿主

Claude Code Codex CLI Gemini CLI