最新资讯
dev.to osFoundry的Loop和Graph是什么,何时该用哪个? dev.to 限制上下文而非限制评审:面向开源补丁的字节预算证据包 dev.to 约束自主智能体:用 GKE Agent Sandbox 实现亚秒级零信任执行 dev.to 实测:给 Claude Code 十个翻译工具,三次运行中有一次完全不用 unite.ai Ramp 数据:企业 AI token 用量增速超过支出增速 pub.towardsai.net AI 生成的 ICLR 评审对被拒论文更宽松:如何压力测试你的 rebuttal blogs.nvidia.com NVIDIA 开源工具如何助力研究者构建下一代 6G 网络 wired.com AI 公司正积极收购企业工作文件与邮件用于模型训练 wechat 网友用AI搓出来的“App”,可以直接在小红书玩起来了? bloomberg.com 科技股抛售后,Anthropic IPO 估值承压 dev.to 当“按设计工作”成为问题:Claude Code 与 .NET 用户机密 dev.to 用代理修复 3500 个 Sonar 问题花 44 美元,让结果可信花 520 美元
多元动态
登录 注册
智能体 developers.cloudflare.com · @Cloudflare Developers

Cloudflare CLI 新增 cf docs search 文档检索命令

原文 我的收藏

Cloudflare CLI 1.0.0-beta.16 加入 cf docs search,开发者与编码 Agent 可在终端内检索 Cloudflare 指南、教程和示例,命令返回最多五条按相关度排序的 JSON 结果(含标题、描述和文档 URL),需联网。Agent 可解析结果并用 Accept: text/markdown 抓取整页 Markdown。该版本还将生成命令名统一为 kebab-case,如 getCredits 改为 get-credits,属破坏性变更。

AI推荐理由 Cloudflare 官方 changelog,介绍 CLI 1.0.0-beta.16 新增 cf docs search,可检索实时文档并返回最多五条带标题、描述和 URL 的 JSON 结果,便于编码 Agent 解析并抓取 Markdown 页面;同时说明命令名统一为 kebab-case 的破坏性变更。对开发者工具链和 Agent 文档检索有实际用途,但仍是 beta 版本,且需联网,未提供检索质量评估。

70

正文

Cloudflare CLI `1.0.0-beta.16` includes `cf docs search`, so you and your coding agent can find Cloudflare documentation without leaving the terminal. Search for guides, tutorials, and examples across Cloudflare products. To install or update to the latest release: npmyarnpnpmbun ``` npm install --global cf@latest ``` ``` yarn global add cf@latest ``` ``` pnpm add --global cf@latest ``` ``` bun add --global cf@latest ``` Describe what you want to do, or ask a question: ``` cf docs search "proxy a DNS record" cf docs search "rate limit requests with WAF" cf docs search "schedule a worker" ``` The command searches live Cloudflare documentation and returns up to five ranked JSON results. Each result includes a title, description, and documentation URL. An Internet connection is required. ![Terminal demo of Cloudflare CLI beta-16 searching DNS and WAF documentation](https://developers.cloudflare.com/cdn-cgi/image/onerror=redirect,width=1280,height=720,format=webp/_astro/docs-search-demo.cWBK3YBx.gif) Agents can parse the results and fetch a complete page as Markdown. For example, use `jq` to select the first result, then request its URL with the `Accept: text/markdown` header: ``` url=$(cf docs search "proxy a DNS record" | jq -r '.[0].url') curl -H "Accept: text/markdown" "$url" ``` This release also standardizes generated command names to kebab-case. For example, `cf accounts billing getCredits` becomes `cf accounts billing get-credits`. For the full list of breaking command and flag changes, refer to the [Cloudflare CLI release notes ↗︎](https://github.com/cloudflare/cf/blob/main/packages/cli/CHANGELOG.md). For more information, refer to [Find Cloudflare documentation with a coding agent](https://developers.cloudflare.com/cf/agents/#find-cloudflare-documentation).

来源报道 · 1 篇 · 以下链接均前往原始媒体

Cloudflare Developers Cloudflare CLI 新增 cf docs search 文档检索命令 10-16 · 原文发布
← 返回精选动态 原文

更多内容