workflow
unanchored
new-cf-worker-from-template
Scaffold wrangler.toml + index.js stub and deploy new CF worker.
cloudflareworkersscaffoldnewworkflow
Body
param([string]$name="",[string]$token="")\nif(-not $name){Write-Error "name required";exit 1}\nif(-not $token){$token=$env:CF_API_TOKEN}\n$dir="$env:USERPROFILE\\$name"\nNew-Item -ItemType Directory -Force $dir|Out-Null\nSet-Location $dir\n"name = `"$name`"\nmain = `"index.js`"\ncompatibility_date = `"2024-01-01`"\naccount_id = `"269368ec7f35ec20dd0485e72fe3ee56`""|Out-File wrangler.toml -Encoding utf8\n"export default{async fetch(r,e,c){return new Response(`"$name ok`",{headers:{`"content-type`":`"text/plain`"}});}};"|Out-File index.js -Encoding utf8\n$env:CLOUDFLARE_API_TOKEN=$token;$env:CLOUDFLARE_ACCOUNT_ID="269368ec7f35ec20dd0485e72fe3ee56"\nnpx wrangler deploy\nWrite-Output "Created and deployed: $name"
Provenance
Cryptographic details
| id | reg_wf_new_worker |
| content sha256 | ea32d925c236a7c3bc4d39505d66f0788e02caf8286c24d559a2fc21ea6defbd |
Execute via API
POST /api/execute
{ "ref": "reg_wf_new_worker" }
// or by hash prefix:
{ "ref": "ea32d925c236a7c3" }
Resolves this artifact by hash — deterministic, provenance-proven. Generation cost is zero when the hash exists.