Template for standalone Cloudflare Workers.
- Vite+ (
vp) — dev server, build, test, lint, format, and type checking in one toolchain cf— the Cloudflare CLI (technical preview), for deploys and everything Cloudflare@cloudflare/vite-plugin2.0, withcloudflare.config.tsfromcf/config- Vitest in Node, with integration tests running the built Worker in Miniflare. No Wrangler
- TypeScript, pnpm
pnpm dev # dev server (with the Cloudflare local explorer at /cdn-cgi/local/explorer)
pnpm test # build, then test the Worker in Miniflare
pnpm check # format, lint, and type check
pnpm fix # same, but auto-fix
pnpm build # production build
pnpm types # regenerate Env and runtime types
pnpm deploy # build and deploy via cf- cloudflare.config.ts — the Worker itself: name, entrypoint, compatibility, bindings.
Envtypes are inferred from the bindings you declare here and generated into.cloudflare/types/bycf workers types(run on install, or withpnpm types). - compatibility.ts — compatibility date and flags, shared with the test runtime.
- vite.config.ts — everything else: Vite, Vitest, oxlint, and oxfmt in one file.
This is a template repository. After creating a repo from it, follow the setup steps in AGENTS.md — or just ask Claude to do it.