CLI Finder / tools / cloudflare-wrangler

用于 Workers、D1、KV 和 R2 操作的 Cloudflare Wrangler

Cloudflare 官方 CLI,用于部署 Workers 并操作 D1、KV、R2、Pages 和日志。

Agent 适配度: 80/100 已验证发布者 持续维护
80 /100

Very useful for Cloudflare operations, but deploy and data commands need approval gates.

Structured output 72/100

Whether the CLI can return JSON, YAML, or stable machine-readable output.

Non-interactive use 78/100

Whether common workflows can run predictably without an interactive prompt.

Safety boundaries 60/100

Whether read-only, dry-run, scoped auth, and destructive command boundaries are clear.

安装方式

npm $ npm i -g wrangler

常用命令

Check version · 安全 $ wrangler --version

Confirms the installed CLI.

List deployments · 安全 $ wrangler deployments list

Inspects recent Worker deployments.

Deploy Worker · 需确认 $ wrangler deploy

Changes production infrastructure and should be approved.

Agent 使用示例

Codex CLI Use global wrangler for Cloudflare checks. Avoid concurrent wrangler commands and ask before deploy or data mutation.

安全说明

  • Read commands such as deployments list and d1 execute SELECT are useful for diagnostics.
  • Deploy, KV writes, R2 deletes, and D1 mutation commands should require approval.
  • For automation, prefer CLOUDFLARE_API_TOKEN over interactive OAuth.

Agent 可以用它做什么

Wrangler 可以帮助 Agent 检查 Cloudflare 配置、查看部署、发布 Workers,并运行受控的 D1 或 KV 操作。

适合场景

适合 Cloudflare Workers 项目,但生产命令需要明确确认,自动化应使用 API token。