patties deploy
Take a built Patties app and push it to the configured host. The framework core is vendor-neutral — the actual deploy step is owned by an installed deploy pl…
Purpose
Take a built Patties app and push it to the configured host. The framework core is vendor-neutral — the actual deploy step is owned by an installed deploy plugin (framework 09-plugins). patties deploy is dispatch + ergonomics; the plugin does the upload.
Usage
patties deploy [--target bun|edge] [--env production|staging|<name>]
[--skip-build] [--cwd <path>] [--config <path>]
Behavior
- Load config (06).
--targetoverridesconfig.target. - Unless
--skip-build, runpatties build(03) for the same target. - Find the deploy plugin for the configured
targetby scanningconfig.pluginsfor the first one that declares a matchingdeployTarget. If none is installed, print remediation and exit 2: ``✗ No deploy plugin installed for target "edge". Install one of: bun add @patties/deploy-cloudflare bun add @patties/deploy-vercel bun add @patties/deploy-deno bun add @patties/deploy-netlify Or write your own — see framework spec 09-plugins.`` - Run the plugin's
deploy(artifacts, ctx)step. The plugin owns:- Vendor auth verification (e.g.
wrangler whoami,vercel whoami). - Shell-outs via
Bun.$to the vendor CLI. - Capturing and returning the deployed URL.
- Vendor auth verification (e.g.
- Print the URL as the last line of output (whatever the plugin returns).
- Bun target with no deploy plugin: print the run command (
bun dist/server.js) and exit 0. Self-hosted deploys are the user's choice of process supervisor (systemd, Docker, fly.io, etc.). The optional@patties/deploy-bunpackages a Dockerfile / systemd unit.
Multi-plugin behavior
If multiple deploy plugins are installed for the same target, --env <name> selects between them by matching the plugin's name. Without --env, the first plugin in declared order wins, with a warning.
Output
✓ built (4.2s)
✓ deploy-cloudflare: wrangler deploy
✓ live at https://my-app.workers.dev
Acceptance criteria
patties deployin a freshly-scaffolded--target edgeapp with@patties/deploy-cloudflareinstalled yields a workingworkers.devURL.patties deploywith no deploy plugin installed exits 2 with the install-this-package message — no stack trace.- Vendor auth missing produces an actionable error (the plugin's responsibility, the framework just propagates the exit code).
--skip-buildreuses the priordist/if present; aborts with a clear error if not.- The framework core has zero
wrangler/vercel/deployctl/netlifyreferences in this code path — all shell-outs originate inside plugins viaBun.$.