@docs.page/cli (英语)
用于命令行工具 文档.p ——启动项目,验证文档,就地预览,管理文档代理.
安装
不安装运行 :
npx @docs.page/cli <command>
或在全球安装:
npm install -g @docs.page/cli
这个 docs 财务报告和审定财务报表 docs.page 二进制在安装后都可以使用 .
图标
init
脚手架上的一个新的docs.page项目 docs.json 并启动 MDX 文件.
docs init
docs init ./my-project --name "My Project"
docs init --no-docs # docs.json only
docs init --overwrite # replace existing docs.page files
check
将您的文档记录为断开的链接、丢失的资产、错误和元数据问题。 有代码的退出 1 当发现错误时, 它在CI中起作用.
docs check
docs check ./my-project
docs check --external-links warn --internal-links error --assets error
docs check --render error --metadata warn
检查的严重程度 : off, (中文(简体) ), warn, (中文(简体) ), error。 。 。 .
preview
启动您文档网站的本地实时重载预览 。 监视 docs.json 财务报告和审定财务报表 docs/**/*.mdx,然后流向浏览器中的docs.page预览UI提供了内容.
docs preview
docs preview --port 4000
docs preview --no-browser
需要一个有效的 docs.json (或 docs.yaml)和至少一个 .mdx 文件编号 docs/。 。 。 .
agent
为 GitHub 仓库管理 docs.page 文档代理 .
docs agent create --repo org/repo --provider openai --apikey sk-...
docs agent delete --repo org/repo
支助提供者: openai, (中文(简体) ), anthropic, (中文(简体) ), google, (中文(简体) ), xai。 。 。 .
全球备选方案
docs --api-url https://your-api.example.com <command>
默认 DOCS_PAGE_API_BASE 环境变量,或生产docs.page API.
文档
学习更多 文档.p。 。 。 .