status: active
timestamp: 2026-06-20
tags: [services, dev-tools, cloudflare, workers, cli, primary]
Wrangler
Cloudflare official CLI for Workers/Pages/KV/R2/D1/Queues — free with Cloudflare account
Wrangler
Role
Cloudflare’s official CLI for every Worker in the family —
the umbrella api.oriz.in Hono Worker per
hono-worker-api-umbrella,
the s.oriz.in shortener Worker, the og.oriz.in Satori
endpoint, plus per-site Pages Functions where used.
Two modes:
- Local mode (
wrangler dev) — runs the Worker in a local workerd instance with miniflare-emulated bindings (KV / R2 / D1 / Queues / Durable Objects). HMR on file change. - Remote mode (
wrangler dev --remote) — runs the Worker on real Cloudflare infrastructure with the actual production bindings. Required for behaviour-parity testing against real KV / R2 / Queues semantics.
Plus deploy (wrangler deploy), tail (wrangler tail), secret
management (wrangler secret put), KV / R2 / D1 / Queues admin
sub-commands.
Free tier
- Unlimited CLI usage as part of the Cloudflare free Workers plan (100,000 requests/day) — Wrangler itself doesn’t bill; it’s the operator surface for the underlying Worker plan.
- Local mode uses zero Cloudflare-side quota; runs entirely on the developer machine.
- Remote mode consumes the same 100K/day Worker request envelope as production traffic — covered by the CF Worker quota mitigation playbook.
Card / subscription required?
NO. Free as part of the Cloudflare account. Cloudflare R2 remains rejected on adjacent-paid-feature card-on-file grounds — Wrangler the CLI is fine; the Workers Paid plan it can also deploy to is what’s avoided.
Install + use
pnpm add -D wrangler@latest
pnpm wrangler login # browser-auth into the CF account
# Local dev (workerd)
pnpm wrangler dev --port 8787
# Remote dev (real Cloudflare)
pnpm wrangler dev --remote
# Deploy
pnpm wrangler deploy
# Tail production logs
pnpm wrangler tail
# Secrets — pulled from Doppler per secrets-management-doppler
doppler secrets download --no-file --format env | \
while IFS='=' read -r k v; do
echo "$v" | pnpm wrangler secret put "$k"
done
Pinned major version per
rules/always-latest-deps;
upgraded by Dependabot per
code-quality-five-tools.
Why this is our pick
- Official. No third-party Worker CLI is as well-supported for the actual edge runtime; alternatives (denoflare, cloudflare-cli) lag behind Cloudflare’s own platform releases.
- Local + remote parity in one tool — no separate “test against real bindings” workflow.
- Free + no card — fits the family’s
no-card-on-fileandno-subscriptionsrules. - Composes with Cloudflare Tunnel —
wrangler dev --port 8787+cloudflared tunnel run --url http://localhost:8787 dev-orizexposes the in-flight Worker ondev.oriz.infor webhook senders.
Alternatives
- Miniflare (standalone) — lower-level emulator that Wrangler now embeds; no reason to use directly when Wrangler is the same engine plus the deploy surface.
- denoflare — Deno-based Cloudflare Worker CLI; trails the platform on new bindings. Rejected.
- wrangler v1 — legacy; Cloudflare deprecated it. Wrangler v3+ is mandatory.
Swap cost
High — Wrangler is tightly coupled to the Cloudflare Workers
runtime + binding API. Swapping the CLI without swapping the
runtime is impossible; swapping the runtime would mean
abandoning Cloudflare Workers entirely (Vercel Edge / Deno
Deploy / fly.io) which fights
hono-worker-api-umbrella
and the broader CF stack lock.
Configuration files
wrangler.toml(orwrangler.jsonc) — per-Worker config withname,main,compatibility_date,[vars],[[kv_namespaces]],[[r2_buckets]],[[queues.producers]]/[[queues.consumers]], etc..dev.vars— local-dev secrets (gitignored). Production secrets go viawrangler secret putfrom Doppler persecrets-management-doppler.
Cross-refs
- Local dev tunneling decision
- Cloudflare Tunnel — pairs with Wrangler for webhook testing
- Dev-tools index
- Cloudflare Workers — runtime Wrangler deploys to
- Hono Worker API umbrella
- CF Worker quota mitigation playbook
- Secrets management — Doppler
- Use pnpm rule
- No card-on-file rule