The logic lives in the packages and upgrades with them. What lands in your repository is thin enough to read in a sitting — a config file, a wrangler file, and a mount. And every command is drivable by an agent.
It installs with your project's own package manager, reads the real manifest out of node_modules rather than trusting a catalog, resolves what the capability composes against as a graph, and writes the bindings into every environment stanza your wrangler file declares.
$ pithy add payments --with-prerequisites
▸ secrets installed, wired, migrated
▸ auth installed, wired, migrated
▸ payments installed, wired, migrated
▸ wrangler.jsonc updated: staging, prod
Done.
This is the part most CLIs bolt on later and never finish. Every command supports --json, and a failure is one structured line that names the problem, the action and the exit code. The code says what to do next: 2 to fix the call, 3 to set something up first, 4 to retry, 5 to stop and ask a person. So a coding agent can install a capability, read what happened, and decide what to do next without parsing prose.
pithy schema --json describes every command the installed version takes, so an agent builds its call from the binary rather than from a guess. A run that may not ask never waits on a prompt: a question with a default takes it, and one without fails, naming the flag that answers it. And --dry-run plans in one shape on every command that takes it, so an agent can read what a run would change before anything changes.
{
"error": {
"code": "input/required",
"status": 400,
"flag": "--with-prerequisites",
"message": "auth requires secrets and email, which api does not compose.",
"action": "Run `pithy add auth --worker api --with-prerequisites --json`, or compose them first: `pithy add secrets --worker api --json`, then `pithy add email --worker api --json`.",
"exit": 2,
"retryable": false,
"fix": "pithy add auth --worker api --with-prerequisites --json"
}
}
One command cuts a git worktree and its branch, reserves a port block so several features run at once, installs, migrates and seeds a local backend. A second provisions that branch its own ephemeral Cloudflare resources — its D1, its KV, its R2, its own master key.
Every name is derived from the branch, so an already-provisioned resource is recovered by looking it up rather than by anything stored. That is what makes it idempotent, resumable, and safe to run from CI. And the ids land in a build artifact, never in your tracked config, so git add -A cannot commit them and a branch abandoned without teardown strands nothing.
$ pithy feature create checkout-flow --issue 214
▸ worktree .worktrees/214-checkout-flow
▸ branch feature/214-checkout-flow
▸ ports reserved 8110-8119
▸ backend migrated, seeded
$ cd .worktrees/214-checkout-flow
$ pithy provision --feature
▸ d1 myapp-214-checkout-flow
▸ kv myapp-214-checkout-flow-sessions
▸ r2 myapp-214-checkout-flow-uploads
Done.
An isolated worktree, a real environment, and structured output on every command is the loop a coding agent already wants: take an issue, get a branch and infrastructure of its own, build, deploy a preview, and tear the whole thing down when the pull request closes.
Teardown deletes by recomputed name regardless of what anyone recorded, so a half-finished run cleans up too. Put the same two commands in CI and every pull request gets a real environment rather than a shared staging everyone queues for.
$ pithy feature sync --json
$ pithy provision --feature --json
$ pithy deploy --env feature --json
# and when the pull request closes
$ pithy feature destroy --json
If you build with Claude Code, the pithy plugin puts these commands to work as a team: a server, a web client, a mobile client and a runner, each on the model you choose. The runner passes --json wherever a command takes it and reads the result, the agents check pithy schema --json before they guess at a flag, and a run that exits 5 comes back to you.
It installs from the kit's release branch, so it never names a command your installed CLI does not have.
/plugin marketplace add pithy-sh/pithy#release
/plugin install pithy@pithy
/new-app both
pithy mcp connect registers an agent's own connection to one environment and writes the server into your MCP client. Its tools are your Worker's admin routes, read from the Worker each time the client asks, and only the ones you granted it a scope for.
The credential is the agent's own: a key that stays on your machine, readable only by you, or for a CI job, a trust in the job's own identity, with no key at either end. Every call is checked and recorded by your Worker as an agent's, and pithy mcp disconnect revokes it.
pithy mcp connect --env prod --purpose "support triage"
pithy mcp status
pithy mcp disconnect --connection pithy-myapp-prod
pithy remove is destructive, so it is interactive only. Passing --json fast-fails with a clear error before anything changes, and its confirmations are typed at a real terminal.
Tearing down an ephemeral environment is a different command, because that is a different intent.
$ pithy remove payments --drop --json
error remove is interactive only; --json is refused.
Nothing has changed.
Run it in a terminal, or use the feature lifecycle
to tear down an environment.
In a terminal it asks one question for the whole cascade. With --with-prerequisites it proceeds. Anything non-interactive exits and names the exact commands to run, in order — and nothing is wired.
Composing something nobody asked for is not a thing to do behind your back, and reporting success on a project that cannot boot is worse.
$ pithy deploy --env prod
▸ typecheck ok
▸ test ok
▸ migrate 3 applied
▸ deploy myapp-api → prod
Done.
The surface
init · add · remove · worker · ui · alias · contract · privacy
setup · dev · migrate · seed · deploy · env · doctor
secrets · cloudflare · token · provision · feature · upgrade · dashboard · mcp · audit · backup · restore · docs · schema · completion
payments · email · storage · media · vector · support · testers · turnstile
Every one of them takes --json, except the one that deletes things, and pithy mcp serve, whose output is the protocol itself.
Install a capability, wire its bindings, run its migrations. Then deploy.