MIT · Cloudflare-first · OpenTofu or Terraform

Infrastructure that checks itself.

One command gives a business real infrastructure as code on Cloudflare. The done-when checks ship in the box, a watchdog keeps every service online, and when the checks pass the same setup graduates to AWS, Kubernetes and Argo CD.

$ npm create devops-box@latest acme-ops
Sign in · pick an account · paste one token · get a live stack with green checks
box-init.logacme-ops · staging
00:00 SIGN INbrowser opens · wrangler login
00:09 ACCOUNTAcme Co detected
00:21 TOKENbootstrap token stored in Keychain
00:24 R2 STATEacme-ops-tfstate · encrypted remote state
00:52 TOFU APPLYD1 · KV · R2 · Queue for staging
01:07 DEPLOYEDacme-ops-staging.workers.dev
01:11 BOX CHECK G05 checks · state remote · licenses allowed
The problem

Most small businesses run on infrastructure nobody can rebuild.

It was clicked together in a dashboard, the person who set it up has moved on, and nobody finds out a service is down until a customer does. Enterprise teams solve this with infrastructure as code, pipelines, and on-call. That stack takes weeks to stand up, so a $10M business never gets it.

DevOps in a Box puts the same habits behind one command, on the platform that is cheapest to start on, and proves each habit with a check instead of a promise.

Onboarding

Three answers to a live stack.

Onboarding is the product. Every prompt has a default, every error says the fix, and re-running picks up where it stopped.

01

Sign in to Cloudflare

The browser opens for wrangler login. If you're already signed in, the box skips this.

02

Pick the account

One account is picked for you. With several, you choose from a numbered list.

03

Paste one bootstrap token

The box prints exactly which permissions to grant, then keeps the token in the macOS Keychain.

Account Workers Scripts · D1 · Workers KV · R2 · Queues · Access · Tunnel Edit User API Tokens Edit (used once, to mint narrower per-job tokens)
✓

Everything after that is automatic

R2 state bucket, tofu apply for staging, a deployed sample app, scoped CI tokens, an optional GitHub repo with secrets set, and box check g0.

Why one manual step

Cloudflare's browser sign-in can't create API tokens, so the user makes one. After init, OpenTofu only uses it to create narrower tokens for each CI job, and it can be revoked.

The gates

Five gates. Each one ends when its checks pass.

The check IDs come straight from the DevOps training plan's done-when lists. They are code in checks/, run by box check on a laptop and in CI, and every result lands in the run view.

A change moves through five gates; failing checks hold it at the gate, and the watchdog loops back from G3. WATCHDOG · WEFT INCIDENT · ONE SCOPED REPAIR FAIL · STAY G0 FOUNDATIONonboard · state G1 SHIPpush deploys G2 DONE PROPERLYenvs · secrets G3 KEEP ONLINEwatchdog · WEFT G4 GRADUATEAWS · k8s · Argo
G0 · onboarding, remote state, license and harness checks.
G0

Foundation

The box installs and proves itself.

onboard-freshstate-remoteharness-runslicenses-allowedboth-binaries
G1

Ship one app

A push deploys; destroy and apply rebuilds.

push-deploysrebuild-cleanno-driftpipeline-explained
G2

Done properly

Same modules, least privilege, timed restore.

env-paritytoken-scopeno-secretsaccess-gatedrestore-drill
G3

Keep it online

Probe everything, repair with evidence.

watchdog-greenrestart-drillpaged-selfoffsite-view
G4

Graduate

Eject to the stack the plan teaches.

eject-appliesargo-syncedchecks-portableexplain-eks
Keep it online · WEFT

When something breaks, evidence comes before the fix.

A Worker on a five-minute cron probes every service in services.yaml. Two failures in a row open an incident, and the incident follows the WEFT loop from the measurement guide. The watchdog collects evidence and names the seam. A person owns the repair.

The incident path

Steps in gold are automatic. Green steps belong to the owner. Auto-rollback is allowed only for Environment seams on services marked eligible.

freeze goal→ starting state→ trace→ read back→ name the seam→ one repair→ rerun + negative control→ review

Four seams

Environment: no response or a 5xx. Harness: the probe was refused. Task: the service is up but serves the wrong thing. Evaluator: the check can no longer tell pass from fail.

seam Environment reason status 503 outside expected 2xx repair roll back to last good version gate owner approval

watchdog.log

What one incident looks like from open to close.

10:05 PROBE jev-gateway 503 412ms 10:10 PROBE jev-gateway 503 398ms 10:10 INCIDENT opened · seam Environment 10:14 REPAIR owner rolled back one version 10:15 RERUN 200 ×2 · control failed as expected 10:20 REVIEW approved · closed

The live watchdog is running now against the Organized AI services. Open the run view →

Graduate

Same idea, bigger tool.

Every Cloudflare piece in the box stands in for a concept that transfers. When G3 is green, box eject writes the graduated stack next to the Cloudflare one, and the same check IDs run against it.

Concept
In the box
Graduated
Infra as code
OpenTofu cloudflare provider, R2 state
OpenTofu AWS modules, S3 state
Delivery
GitHub Actions, Worker versions
CI builds images, Argo CD reconciles
Environments
Staging and prod from one module
Accounts or namespaces from one module
Identity
Scoped API tokens per job
IAM roles, OIDC, no wildcards
Network
Access and Tunnel
VPC, private subnets, security groups
Self-healing
Cron, Durable Object alarms, Queues
CronJobs, controllers, probes
Recovery
D1 Time Travel restore drill
Snapshots, point-in-time restore
Observability
Workers Logs, D1, Analytics Engine
Prometheus, Grafana, Alertmanager
Why it's built this way

Habits you can prove, not promises.

01

Checks are code

A gate passes when its checks are green in CI. Checks for unbuilt gates say "not built yet" instead of passing.

02

People own side effects

The watchdog gathers evidence and proposes one repair. Closing an incident takes the owner's token.

03

Nothing to unlearn

Every primitive maps to its AWS and Kubernetes equivalent, so a client who outgrows the box keeps the habits and the checks.

Install

Pick how you want to start.

01 · CLI

One command

Node 20+, a Cloudflare account, and OpenTofu or Terraform.

02 · CLAUDE CODE

Build it with an agent

A phased prompt that builds and verifies gate by gate.

03 · LIVE

See it running

Services, checks and incidents from the watchdog on this deploy.

Open run view →
MIT licensed. The box calls OpenTofu or Terraform as a separate process and bundles neither. For a hosted offering, use OpenTofu: Terraform's license limits competing hosted services. Source: organized-ai/devops-in-a-box.
claude --dangerously-skip-permissions

Clone github.com/organized-ai/devops-in-a-box into /Users/supabowl/devops-in-a-box and continue building it gate by gate.
First apply the Organized Codebase agent templates to .claude/.
A gate is done only when `node cli/box.mjs check <gate>` passes in CI. Keep checks honest: unbuilt work reports "not built yet".
Next: finish G1 (tofu apply in CI with R2 state credentials, rebuild-clean job), then G2 (env-parity, token-scope, no-secrets with gitleaks, access-gated, restore-drill).
Read README.md and RUNBOOK.md first. No time estimates anywhere.