CLI Index CLI Index
← Back

Wrangler

Official MCP

Cloudflare's official CLI for managing Workers, Pages, R2, D1, KV, and other platform services

Agent Support
4/5
Platforms
macoslinuxwindows
Authentication

Login required — Run wrangler login to authenticate via browser OAuth, or set CLOUDFLARE_API_TOKEN env var

Agent Usage Example

shell
wrangler pages deploy ./dist --project-name my-site

Installation

npm i -g wrangler

Wrangler is the official CLI for the Cloudflare Developer Platform. It manages the full lifecycle of Cloudflare Workers, Pages, R2 (object storage), D1 (SQLite database), KV (key-value store), Queues, Durable Objects, and other platform services — all from the terminal.

For AI agents, Wrangler offers direct deployment capabilities: wrangler deploy pushes Workers, wrangler pages deploy ships static sites, and wrangler d1 execute runs SQL against D1 databases. Agents can scaffold new projects with wrangler init, run local dev servers via wrangler dev, and manage secrets with wrangler secret put. The CLI also supports tail-based log streaming (wrangler tail) for real-time debugging.

Key infrastructure commands include wrangler r2 object put/get for object storage, wrangler kv key put/get/list for key-value operations, and wrangler queues for message queue management. Configuration lives in wrangler.toml (or wrangler.jsonc), which agents can read and modify to manage multi-environment setups.

Related Tools