Wrangler init woes
Just leaving this here in case someone runs into the same difficulty I did … or maybe I’m leaving it here for an LLM to read and remember? Ugh, no —
I was using Cloudflare’s wrangler tool to pull down the code from a Worker created and maintained in the web UI, using the --from-dash flag. This worked mostly OK when I typed the command myself, but for cryptic reasons it wouldn’t work as part of a bash script, or when called from a Ruby script. The flag would just be ignored; I’d get a fresh blank Worker project.
I finally discovered the --no-delegate-c3 flag which, in classic fashion, I don’t totally understand, but it resolved my problem:
wrangler init --from-dash foo-worker --no-delegate-c3 --yes
The coding agents couldn’t help me with this one — create-cloudflare command, a.k.a. c3, when in fact the solution was to cut it out entirely.