Wrangler CLI
Cloudflare’s command-line tool for developing and deploying Workers.
What It Is
Wrangler is the official CLI for Cloudflare Workers, providing local development, testing, and deployment capabilities. It handles the entire development lifecycle from scaffolding new projects to deploying to production.
How We Use It
Wrangler is the primary deployment and development tool for all Cloudflare-hosted services:
- Local development:
wrangler devprovides a local development server with hot reload - Deployment:
wrangler deploypushes code to Cloudflare’s edge network - Database management:
wrangler d1commands for D1 database operations - Storage:
wrangler r2for R2 bucket management - Pages:
wrangler pagesfor static site deployments
Development Workflow
# Start local development serverwrangler dev
# Deploy to productionwrangler deploy
# Run D1 migrationswrangler d1 migrations apply production
# Tail production logswrangler tailWhy It Matters
Wrangler provides a consistent interface across all Cloudflare primitives. It enables local development that closely mirrors production behavior, reducing the gap between development and deployment environments.
Uses Supplier Primitives
Enables Capabilities
- Smartbox: capability-scoped execution workspaces
- Nomos: domains compiled to OpenAPI, MCP, CLI and SDKs