Repository navigation
Releases: oablab/cfdrop
Release list
v0.7.0 — deploy into your own Cloudflare account (--own)
Deploy into your own Cloudflare account (--own)
Until now cfdrop only deployed to a temporary Cloudflare account that expires after 60 minutes unless claimed. 0.7.0 adds an explicit own-account mode: point it at your account with a single-permission API token and the site lives there permanently, no claim step.
export CLOUDFLARE_API_TOKEN=... # Account API Token, Workers Scripts · Edit — that's all
cfdrop deploy -d ./site -n docs --own # → https://docs.<your-subdomain>.workers.dev
cfdrop rm -n docs # delete it when you're doneWhat's new
--own,--account <id>,CLOUDFLARE_ACCOUNT_IDswitch on own mode. A bareCLOUDFLARE_API_TOKENin the environment (common for wrangler users) does not — a throwaway preview cannot land in a real account by accident.--temporaryforces the default even when the account id is set.- Token from
CLOUDFLARE_API_TOKENor--token-file <path>; never from argv. If own mode is requested and no token is found, cfdrop errors instead of silently falling back to a temporary account. - Minimal permission: one Account API Token with
Account · Workers Scripts · Edit, created athttps://dash.cloudflare.com/<account id>/api-tokens. User tokens work too. The preflight only calls endpoints valid for both kinds (GET /accounts,GET /accounts/{id}/workers/subdomain) — never/user/*, where account tokens answerInvalid API Token. - Account inference: when the token sees exactly one account it is used; several →
--accountrequired; a requested account outside the token's scope is refused. - Overwrite protection: every cfdrop deploy is tagged
cfdrop. A--namethat collides with an existing Worker without that tag is refused unless you pass--force. Same rule forrm. cfdrop rm -n <name> [--account <id>] [--force]deletes an own-account site.cfdrop statusnow reports what the own-account environment would do (token + account set → deploy goes to your own account,token set, no account → still temporary, …).- Actionable errors for the common misconfigurations: missing
Workers Scripts: Edit(API code 10000), no workers.dev subdomain registered yet (prints thePUTthat registers one), multiple visible accounts. --freshwith own mode is rejected (meaningless);--authin own mode warns that a baked-in Basic Auth credential is preview-grade — use Cloudflare Access for permanent sites.
Docs
- README: step-by-step guide — token creation, verification
curls, account selection, deploy/update/delete, CI snippet, troubleshooting table keyed on the exact error strings (#2). - ELI5 walkthrough: https://eli5.openab.dev/howto-cfdrop-owned-account/
skills/cfdrop/SKILL.md: own-account usage block;--ownneeds ≥ 0.7.0.
Verified
Live against a real account with a Workers-Scripts-Edit-only account token: deploy → 200, same-name redeploy → updated in place, deploy onto a foreign untagged Worker → refused, rm foreign → refused, rm ours → 404 afterwards, own-without-token → error (no fallback), --fresh --own and --own --temporary rejected. Default temporary path unchanged. 42 unit tests, clippy -D warnings clean.
Compatibility
No breaking changes. Without any of the new flags/env vars, cfdrop deploy behaves exactly as 0.6.x (temporary account). Binaries: linux amd64/arm64 (static musl), macOS arm64.
Full Changelog: v0.6.1...v0.7.0
cfdrop v0.6.1
Full Changelog: v0.6.0...v0.6.1
cfdrop v0.6.0
Full Changelog: v0.5.0...v0.6.0
cfdrop v0.5.0
Full Changelog: v0.4.1...v0.5.0
cftmp v0.4.1
Full Changelog: v0.4.0...v0.4.1
cftmp v0.4.0
Full Changelog: v0.3.0...v0.4.0
cftmp v0.3.0
Full Changelog: v0.2.0...v0.3.0
cftmp v0.2.0
Full Changelog: v0.1.0...v0.2.0
cftmp v0.1.0
Full Changelog: https://github.com/oablab/cftmp/commits/v0.1.0