Skip to content

CLI Reference

Commands

CommandDescription
tamer bootstrapCreate account-scoped Tamer metadata (D1 state + D1 secrets vault + R2 artifacts)
tamer syncSync local state from Cloudflare (no writes)
tamer applyProvision missing resources (creates shard 0 for each resources.shardGroups[] entry)
tamer migrateRun D1 migrations per worker (includes stack-level shard groups)
tamer seedRun D1 seed SQL per worker (seedDir; idempotent by author convention)
tamer shard addAppend the next physical D1 to a stack-level shard group; regenerates wrangler + src/shard-bindings.ts
tamer deployBuild (if declared) + wrangler deploy per worker, then apply routes
tamer devwrangler dev (use --all for every worker)
tamer statusShow config vs state
tamer driftCompare state vs Cloudflare (read-only)
tamer planPreview what apply+deploy would create (read-only)
tamer importRegister an existing CF resource into state by logical name
tamer doctorVerify CLOUDFLARE_* credentials
tamer wfp tenant provision/destroyCreate / remove per-service tenant D1s + dispatch scripts + state. Provisions shard 0 for each shardGroups[] entry and one copy per d1[] utility database. Assigns a monotonic tenantNumber and writes the tenant directory row when wfp.tenantDirectory is configured. --namespace selects the product namespace when more than one is declared. Migrations then seed run before script upload (default on; --no-migrate / --no-seed to skip).
tamer wfp tenant listList provisioned tenants (product:workspace) and their status
tamer wfp tenant statusShow one tenant's dispatch scripts (one per service), shards, and provisioning status
tamer wfp tenant migrateRun D1 migrations on every physical shard in each tenant shard group + per-tenant utility D1s (--env local: regenerate wrangler pair then miniflare migrate)
tamer wfp tenant seedRun D1 seed SQL on every physical shard / utility D1 that declares seedDir (--env local: regenerate wrangler pair then miniflare seed)
tamer wfp tenant add-shardAppend the next physical D1 to a tenant shard group, migrate + seed it, and re-upload the dispatch script
tamer wfp tenant resetDelete + recreate tenant D1(s), migrate, seed, reupload dispatch scripts (greenfield squash loop; --env local regenerates wrangler pair + wipes miniflare sqlite)
tamer wfp tenant wrangler--env local only: write gitignored wrangler.json + wrangler.vitest.json from the WFP template (dev → primary; Vitest → sibling)
tamer destroyRemove workers + storage + namespaces for an env
tamer resetDelete + recreate D1(s), migrate, seed, redeploy bound workers (d1 only; --env local wipes miniflare sqlite only)
tamer eventsPrint operation history timeline
tamer env listList known envs (rows in tamer-state)
tamer env gcGarbage-collect stale ephemeral envs (--max-age, --dry-run, --force)
tamer typesGenerate Wrangler type files for a worker
tamer wfp putUpload a single-module Worker to a dispatch namespace
tamer wfp deleteDelete a Worker from a dispatch namespace
tamer secretsEncrypted vault: init, set, load, copy, get, list, rm, verify, push, migrate

Common flags

FlagUsed byPurpose
--env <name>All commandsTarget environment (defaults to local; deploy requires it explicitly — never silently prod)
--worker <name>deploy, destroy, shard add, migrate, seed, secrets subcommandsScope to one worker (secrets: shorthand for --target worker:<name>)
--config <path>All commandsConfig file path
--forcedestroy, wfp tenant destroy, wfp tenant resetSkip protected-env gate
--confirm-env <name>destroyConfirm env destruction
--confirm-tenant <workspace>wfp tenant destroy, wfp tenant resetConfirm tenant operation on protected envs
--namespace <product>wfp tenant provision, migrate, seed, add-shard, resetSelect product namespace (required when multiple wfp.namespaces declared)
--group <name>shard add, wfp tenant add-shardShard group logical name
--service <name>wfp tenant migrate, seed, add-shard, reset, wranglerLimit to one worker template (omit = all services)
--no-migrateshard add, wfp tenant add-shard / provision / resetSkip D1 migrations after recreate
--no-seedshard add, wfp tenant add-shard / provision / resetSkip D1 seed after migrate
--skip-reuploadwfp tenant resetSkip dispatch script reupload after migrate (no-op for --env local)
--shards <a,b,c>wfp tenant provisionAccepted for backward compatibility; no-op under the shard-group model
--jsondrift, plan, doctor, wfp tenant provisionMachine-readable output
--target <kind>:<logical>apply, plan, destroy, reset, wfp tenant reset, wfp tenant destroy, import, secrets subcommandsScope to one resource / owner (destroy + wfp tenant reset also accept shard_group:<name>; wfp tenant destroy accepts d1 / shard_group; not with --plan, --wipe-metadata, --skip-workers. Secrets: <kind>:<owner> = worker:<key> or wfp:<namespace>/<template>)
--kind <kind>apply, plan, destroy, reset, wfp tenant resetEvery declared resource of that kind (mutually exclusive with --target; e.g. --kind d1). wfp tenant reset --kind durable_object wipes DO instances + data by deleting and re-uploading the tenant script(s) — requires --confirm-do-delete, touches no D1, remote envs only
--skip-deployresetSkip redeploy after migrate (workers keep stale D1 UUID bindings)
--out <file>planSave plan with attestation
--plan <file>apply, destroyExecute saved plan
--allow-staleapply, destroy, drift, status, migrate, wfp tenant reset/destroy/migrate/provision/add-shard/status, importSkip the automatic pre-command sync (and, on apply/destroy --plan, the attestation); operate on local state as-is
--orphansdestroy, wfp tenant destroyDestroy only resources flagged as orphaned (in state + Cloudflare but no longer declared in tamer.config.ts)
--dry-rundestroy --orphans, wfp tenant destroy --orphansList what would be removed without touching Cloudflare or state
--rollback-on-failureapplyUndo partial apply on error
--detailed-exitcodeplanExit 2 when changes pending (CI gate)
--destroyplanPreview destruction instead of creation
--dispatch-namespace <name>deployWFP namespace override
--confirm-do-deletedeploy, wfp tenant provisionRequired when doMigrations would apply new deleted_classes tags (data wipe) to an existing script. Fresh scripts (definitive 404 — e.g. first provision in an ephemeral env) never gate: no instances exist to wipe. wfp tenant reset / add-shard are rebinding-only and freeze DO migrations at the applied tag, so they never need it — except reset --kind durable_object, where it is mandatory
--skip-workersdestroySkip worker deletion
--wipe-metadatadestroyDelete shared state D1 + artifacts R2
--strict-namespace-guardsyncExit nonzero when tenant entries reference namespaces no longer in config (CI gate against the rename footgun)
--from <env>secrets copySource env
--to <env>secrets copyTarget env
--file <path>secrets loadOverride .dev.vars.{env} path (requires --target)
--yessecrets get, env gcSkip interactive confirmation
--alldevRun wrangler dev for every worker
--max-age <duration>env gcMax age before an ephemeral env is GC'd (e.g. 72h)
--dry-runenv gcPrint what would be removed without deleting
--limit <n>eventsCap the number of operations printed
--main <path>wfp tenant provisionOverride the template main entrypoint
--artifact-key <key>wfp tenant provisionDeploy from an R2 artifact instead of --main
--compatibility-date <date>wfp tenant provisionOverride the dispatch script compatibility date
--module-name <name>wfp tenant provisionOverride the ES module export name

Flag syntax

Use space-separated form (--env dev), not --env=dev — the argument parser does not support the --flag=value syntax.

Released under the Tamer Evaluation License.