Template for standalone Cloudflare Workers.
- Vite+ (
vp) — dev server, build, test, lint, format, and type checking in one toolchain cf— the Cloudflare CLI (1.0 release candidate), for dev, build, deploy and everything Cloudflare@cloudflare/vite-plugin2.0, withcloudflare.config.tsfromcf/config- Vitest with
@cloudflare/vitest-plugin, running tests inside workerd against the config incloudflare.config.ts. No Wrangler - TypeScript, pnpm
pnpm dev # dev server (with the Cloudflare local explorer at /cdn-cgi/local/explorer)
pnpm test # test the Worker in workerd
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). - vite.config.ts — Vite, oxlint, and oxfmt.
- vitest.config.ts — tests, via
cloudflareTest({ config: true }), which readscloudflare.config.ts.
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.