npx wrangler types

Category: Cloudflare

npx wrangler types

Generate TypeScript types for your Worker

Writes worker-configuration.d.ts with an Env interface derived from your bindings plus Workers runtime types for your compatibility date. Bindings are the config lines that connect your Worker to KV, D1, R2, and other resources. This replaced the old cf-typegen command. Re-run it after editing wrangler.toml.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.