# AGENTS.md instructions for Cloudflare Wrangler for Workers, D1, KV, and R2 operations

Use Cloudflare Wrangler for Workers, D1, KV, and R2 operations only for: The Cloudflare CLI for deploying Workers and operating D1, KV, R2, Pages, and logs.

## Default behavior

- Prefer non-interactive commands and stable output formats: json, text.
- Start with read-only inspection commands before changing state.
- Show the exact command before destructive or deployment actions.
- Require explicit user approval for commands marked `requires-review` or `destructive`.

## Useful commands

- safe: `wrangler --version` — Confirms the installed CLI.
- safe: `wrangler deployments list` — Inspects recent Worker deployments.
- requires-review: `wrangler deploy` — Changes production infrastructure and should be approved.

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