AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

cloudflare-deploy

Deploy applications and infrastructure to Cloudflare using Workers, Pages, and related platform services. Use when the user asks to deploy, host, publish, or set up a project on Cloudflare.

Original source
openai
License
Apache-2.0
Pinned revision
49f948faa9258a0c61caceaf225e179651397431

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

This skill also requires local files or dependencies. Remote reading alone may not be enough.

Ask your assistant

Use Agentic Memory skills to read openai--cloudflare-deploy at revision 49f948faa9258a0c61caceaf225e179651397431, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 309

references/wrangler/README.md

Cloudflare Wrangler

Official CLI for Cloudflare Workers - develop, manage, and deploy Workers from the command line.

What is Wrangler?

Wrangler is the Cloudflare Developer Platform CLI that allows you to:

  • Create, develop, and deploy Workers
  • Manage bindings (KV, D1, R2, Durable Objects, etc.)
  • Configure routing and environments
  • Run local development servers
  • Execute migrations and manage resources
  • Perform integration testing

Installation

npm install wrangler --save-dev
# or globally
npm install -g wrangler

Run commands: npx wrangler <command> (or pnpm/yarn wrangler)

Reading Order

| If you want to... | Start here | |-------------------|------------| | Create/deploy Worker quickly | Essential Commands below → patterns.md §New Worker | | Configure bindings (KV, D1, R2) | configuration.md §Bindings | | Write integration tests | api.md §startWorker | | Debug production issues | gotchas.md + Essential Commands §Monitoring | | Set up multi-environment workflow | configuration.md §Environments |

Essential Commands

Project & Development

wrangler init [name]              # Create new project
wrangler dev                      # Local dev server (fast, simulated)
wrangler dev --remote             # Dev with remote resources (production-like)
wrangler deploy                   # Deploy to production
wrangler deploy --env staging     # Deploy to environment
wrangler versions list            # List versions
wrangler rollback [id]            # Rollback deployment
wrangler login                    # OAuth login
wrangler whoami                   # Check auth status

Resource Management

KV

wrangler kv namespace create NAME
wrangler kv key put "key" "value" --namespace-id=<id>
wrangler kv key get "key" --namespace-id=<id>

D1

wrangler d1 create NAME
wrangler d1 execute NAME --command "SQL"
wrangler d1 migrations create NAME "description"
wrangler d1 migrations apply NAME

R2

wrangler r2 bucket create NAME
wrangler r2 object put BUCKET/key --file path
wrangler r2 object get BUCKET/key

Other Resources

wrangler queues create NAME
wrangler vectorize create NAME --dimensions N --metric cosine
wrangler hyperdrive create NAME --connection-string "..."
wrangler workflows create NAME
wrangler constellation create NAME
wrangler pages project create NAME
wrangler pages deployment create --project NAME --branch main

Secrets

wrangler secret put NAME          # Set Worker secret
wrangler secret list              # List Worker secrets
wrangler secret delete NAME       # Delete Worker secret
wrangler secret bulk FILE.json    # Bulk upload from JSON

# Secrets Store (centralized, reusable across Workers)
wrangler secret-store:secret put STORE_NAME SECRET_NAME
wrangler secret-store:secret list STORE_NAME

Monitoring

wrangler tail                     # Real-time logs
wrangler tail --env production    # Tail specific env
wrangler tail --status error      # Filter by status

In This Reference

  • auth.md - Authentication setup (wrangler login, API tokens)
  • configuration.md - wrangler.jsonc setup, environments, bindings
  • api.md - Programmatic API (startWorker, getPlatformProxy, events)
  • patterns.md - Common workflows and development patterns
  • gotchas.md - Common pitfalls, limits, and troubleshooting

Quick Decision Tree

Need to test your Worker?
├─ Testing full Worker with bindings → api.md §startWorker
├─ Testing individual functions → api.md §getPlatformProxy
└─ Testing with Vitest → patterns.md §Testing with Vitest

Need to configure something?
├─ Bindings (KV, D1, R2, etc.) → configuration.md §Bindings
├─ Multiple environments → configuration.md §Environments
├─ Static files → configuration.md §Workers Assets
└─ Routing → configuration.md §Routing

Development not working?
├─ Local differs from production → Use `wrangler dev --remote`
├─ Bindings not available → gotchas.md §Binding Not Available
└─ Auth issues → auth.md

Authentication issues?
├─ "Not logged in" / "Unauthorized" → auth.md
├─ First time deploying → `wrangler login` (one-time OAuth)
└─ CI/CD setup → auth.md §API Token

See Also

  • workers - Workers runtime API reference
  • miniflare - Local testing with Miniflare
  • workerd - Runtime that powers wrangler dev