Skip to content

What is Tamer?

Tamer is a Cloudflare Workers infrastructure CLI that treats your stack the way Terraform treats cloud infrastructure. Declare D1 databases, R2 buckets, KV namespaces, Queues, Hyperdrive configs, Vectorize indexes, AI Gateways, Pipelines, Workflows, Secrets Stores, DNS records, and Worker routes in a TypeScript config file. Tamer provisions them, tracks their state, detects drift, and deploys your workers.

What problems does it solve?

Without Tamer: You manually create D1 databases in the dashboard, copy UUIDs into your wrangler.toml, manually create R2 buckets, manually wire up KV namespaces, manually deploy each worker in dependency order, manually manage routes, and manually track what exists where. Cloudflare IDs are scattered across config files. There's no drift detection, no plan preview, no rollback.

With Tamer: You declare what resources each worker needs. Tamer creates them, records their IDs in a state database, generates per-env wrangler.json files, deploys workers in topological order (service bindings first), manages routes via the API, and gives you Terraform-style plan, drift, apply, and destroy commands.

Key features

  • Declarative resources — Declare D1, R2, KV, Queues, Hyperdrive, Vectorize, AI Gateway, Pipelines, Workflows, Secrets Stores, DNS records. Tamer handles provisioning and state tracking.
  • CloudFormation-style stack management — Stack outputs, cross-stack imports, drift detection, plan files with attestation hashes, transactional apply with rollback.
  • Per-env configlocal, dev, prod — each with its own resource names, routes, and variables. No Cloudflare IDs in config (they live in state after apply).
  • SPA build step — Workers can declare a build command. Tamer spawns it with resolved vars as env vars, so compile-time values are baked into the bundle without .env files or codegen.
  • Encrypted secrets vault — Secrets stored encrypted in D1 (tamer-secrets, account-scoped), pushed to workers on deploy. Never in config, never in wrangler.json.
  • Wrangler types — TypeScript types generated from the official Wrangler config schema, exported from the package.

Where to go next

Released under the Tamer Evaluation License.