npx railyard (zero dependencies):
- login: device flow against the console; the org token is saved 0600
and never printed; no option takes a key or token.
- deploy: detects Next.js (OpenNext build for Workers), Vite, Astro
(static output) or plain static; anything else stops with one line
that says what to change (SvelteKit, Remix, Nuxt, server Astro...).
Uses wrangler's own OAuth login on the user's machine, names the
Worker <app> on main and <app>-<branch> elsewhere, and records URL,
commit, branch, framework, duration and status in the console.
- rollback: wrangler rollback to the previous successful version id of
the same branch, recorded with rollback_of.
- deploys: lists recent deploys.
Console: /api/v1/deploys (POST record, GET list) and /api/v1/deploys/:id
with org-scoped bearer tokens; the first deploy of a new app name creates
the app within the plan's limits; a paused or card-less org is refused
with 402. The Apps screen lists recent deploys.
Tests: the CLI runs against a mocked wrangler and the real console
device-flow and deploy code over local HTTP (login, main deploy, branch
preview, records, rollback, OpenNext path, failure, refusals, no token
in any output); deploy service tests cover org isolation and input
validation; README and CLI strings pass the copy lint. The run on a
real Cloudflare account is owner-run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>