# Workers、D1、KV、R2 操作のための Cloudflare Wrangler
Workers デプロイ、D1、KV、R2、Pages、ログ操作に使う Cloudflare CLI。
Agent Readiness Score: 80/100
Very useful for Cloudflare operations, but deploy and data commands need approval gates.
## Install

- npm: `npm i -g wrangler`

## Structured output

Supported output formats: json, text.
Prefer structured output flags such as `--json`, `--format json`, or equivalent when available.

## Safe commands

- Check version: `wrangler --version` — Confirms the installed CLI.
- List deployments: `wrangler deployments list` — Inspects recent Worker deployments.

## Commands requiring approval

- Deploy Worker: `wrangler deploy` — requires-review; require explicit user approval.

## Agent instructions

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

## Safety notes

- 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.

## Metadata

Official URL: https://developers.cloudflare.com/workers/wrangler/
GitHub: https://github.com/cloudflare/workers-sdk
Docs: https://developers.cloudflare.com/workers/wrangler/
