My son built his first mobile app this year. The backend went on Supabase, and when I asked how he had landed there, the answer was one line: “Claude suggested it.”
It was a fine suggestion. He had auth and a database working in an afternoon, which is exactly what a first app needs.
I told him I would have built it on Cloudflare. Then I started explaining how, and heard myself describe about a week of setup.
That gap is why Pithy exists.
Row-level security, or one column?
Partway through, he started explaining row-level security to me, and he was right to be excited. The policy is a rule attached to the table itself: the database evaluates it on every query and decides which rows this caller may see.
I laughed, which was unfair of me. My answer was blunter than it deserved: put a column on the row saying who owns it, filter on that column, and you are done.
We were both right, and the reason is architectural. Supabase hands the browser a key and lets it talk to Postgres directly. When the caller is the client, the only trustworthy place to decide whose rows are whose is the database itself. There, row-level security is the whole perimeter, not ceremony.
Cloudflare’s shape is different. D1 has no public endpoint. It is reachable only through a binding on a Worker you wrote, so there is no connection string to ship to a phone and no anonymous key to rotate when one leaks. Every query already runs in code you control, holding a session you verified.
Be fair about the trade. A database-enforced policy survives a handler somebody wrote carelessly at 1am, and a where owner_id = ? does not. If your clients talk to your database, use row-level security and mean it.
But when a server you own sits in front, most of what the policy protects you from is already gone. What is left is a column.
So why isn’t everybody there already?
That conversation left me with a question I could not put down. Cloudflare is, in my opinion, the best developer platform available right now, and almost nobody reaches for it first.
It is not a capability problem. Nearly the whole stack runs on your machine. wrangler dev boots your Worker, its D1 databases, its KV namespaces, its R2 buckets and its Durable Objects against the real runtime rather than a mock. Isolated environments and a deploy you can put in CI are native to the platform, not bolted onto it.
It is an assembly problem. Wrangler is a platform tool and a good one: it creates one resource at a time and asks you to say exactly what you mean. Matching what supabase init hands you in thirty seconds means knowing which resources to create, what to name them, which bindings they belong in, and in what order. That knowledge is expensive, and it is why the default answer to “what should I use for a backend” is somebody else’s platform.
So that settled it. I like Cloudflare’s tools enough to want other people to like them. I spent a month planning before writing any code.
Fat packages, thin wiring
A capability’s logic lives in its package and stays there, and this is the decision I will defend hardest.
pithy add auth installs @pithy-sh/auth, registers it in your pithy.config.ts, writes the bindings it needs into every environment’s wrangler.jsonc, and runs its migrations. It writes no handler source into your repo. Not a route, not a middleware, not a schema.
What you own is deliberately thin: a config file, a wrangler config, and a mount file. Every capability composes that way — auth, storage, media, email, payments, vector, leaderboard, ledger and the rest — each one its own package under @pithy-sh/*.
The payoff is upgrades. A fix in the auth package reaches you as a version bump, not as a diff you reapply by hand to code a generator pasted into your repo six months ago. A starter template does the opposite: generous on day one, yours forever afterwards.
The cost is living inside somebody else’s abstraction, so there is a door out. pithy add auth --eject copies that package’s src/ into your repo and repoints the imports. The code is then yours and nothing upgrades it, which is why the move is one-way.
One command, every Worker
A real Pithy project is not one Worker. It is your API, often a web front end, and a host Worker for every capability that owns a Workflow — email’s sender, storage’s sweeper, payments’ reconciler. Six processes, six ports, and a web of local URLs each one has to know before any of them starts.
pithy dev runs the lot under one supervisor. It discovers your Workers from apps/, resolves each composed capability’s host, pins every port, bakes the cross-Worker URLs in as *_ORIGIN dev vars so Workers call each other directly, and regenerates each Worker’s .dev.vars from your local secrets file on every run. Output is labeled per Worker and kept behind a live roster of ports, states and startup times. A Worker that starts but never becomes ready is named, rather than left for you to find forty lines up the scrollback.
Two honest gaps. Vectorize and Workers AI have no local emulation, so those bindings run against your real account. And email genuinely sends: in dev the send binding runs remote by default, so a magic link triggered from localhost arrives with real DKIM. Without credentials or an onboarded domain, the run says so and swaps in a local simulator.
An environment per branch
Environments were the first thing I told my son about.
pithy provision --env staging creates that environment’s own Cloudflare resources, wires them into every Worker’s config, and migrates. The same command with --feature does it for a branch.
pithy feature create <slug> --issue <n> cuts a git worktree, reserves a port block no other checkout on the machine overlaps, then migrates and seeds a local backend. pithy provision --feature gives that branch its own live environment: its own databases, buckets and indexes, its own secrets manager holding its own master key, its own host Worker per capability, answering on its own workers.dev address. It shares nothing with staging or production but the account. pithy feature destroy deletes all of it, and a merged pull request can run that for itself.
Per-branch isolation is not a pricing tier here. It is a command.
An empty database is not a working app
A backend that boots is not a backend you can look at. You need users, rows, and a way to be signed in as one of them.
pithy seed loads fixtures from the same Zod schemas that define your tables and KV stores, so there is no fixture format to learn. A fixture is an app-shape value — a real Date where your code reads a Date — re-validated by the exact inverse of the parse your handlers use, so a bad fixture fails with a field-level error rather than a puzzling row. Rows insert with INSERT OR IGNORE, so a second run adds nothing.
Then press l in pithy dev and you are signed in as a seeded identity.
What it is not, yet
The CLI is at 0.13.0, and that number is the honest one: the shape is settled, the surface is not. Every command takes --json and none requires a prompt, because an agent drives the same CLI you do.
D1 is SQLite, not Postgres. If you already have an application built against Postgres — extensions it depends on, stored procedures, queries written to its planner — porting it is real work, and Supabase is the better answer. Most new apps carry no such attachment, and some of the old objections have quietly expired along the way: D1 runs triggers now.
What I will claim is the thing that started this. Cloudflare deserves to be the obvious place to build a backend, and the only reason it is not is that nobody had done the assembly. That is a solvable problem, and it is where the month of planning and the four months since have gone.
pithy init. Then tell me where it hurts.