Agent usage of Cloudflare's Wrangler CLI has grown dramatically over the past year. By March 2026, automated agents accounted for a quarter of all Wrangler activity, up from single-digit percentages twelve months earlier. Last week, that figure climbed to 48%. These agentic users operate with considerably higher command velocity, invoking nearly twice as many distinct operations daily and being four times more likely to chain six or more commands together.
Yet Wrangler's command set covers only around 280 operations, while Cloudflare's platform spans thousands. To bridge this gap, Cloudflare has introduced cf, a new CLI designed specifically for the era of agentic software development. The tool is now available as an open beta and can be installed globally via npm i -g cf.
Unified API generation powers comprehensive coverage
Wrangler evolved through incremental contributions from individual product teams, each implementing their own approach to command design. This decentralized model resulted in inconsistent terminology—compare d1 info, hyperdrive get, and workflows describe—and duplicated effort solving similar problems in different ways. Some teams invested thousands of lines of code into rarely-used custom experiences.
Cloudflare's new Forge pipeline addresses this by generating CLI commands directly from the OpenAPI schemas that already power the company's API documentation and SDK generation. With minimal additional annotation, these schemas become the source of truth for command generation. This approach scales cf from Wrangler's ~280 functions to cover the entire Cloudflare API surface of over 3,000 operations, enabling agents to orchestrate complex workflows—setting up a Worker, deploying it, monitoring it, protecting it with Cloudflare Access, purchasing a domain, and fronting it with WAF—all from a single tool.
Built for agents encountering the tool for the first time
Introducing an entirely new CLI sidesteps a fundamental challenge: Wrangler's behavior has been absorbed into the training data of large language models, and significant changes would conflict with learned patterns. A fresh tool designed specifically for agents avoids this friction. Cloudflare has built novel agentic command discovery features into cf that the company expects will become standard across other CLIs.
JSON serves as the default output format rather than human-readable tables. While Wrangler users typically append --json and pipe results through jq to extract relevant fields, cf treats structured output as the primary interface. For operations requiring human input—such as domain searches—the CLI presents validated form fields. Agents can also invoke interactive flows if needed, though the tool is optimized for programmatic interaction.
Natural language command discovery at scale
With 3,000 possible operations, agents need a way to locate the correct command without exhausting context windows. The cf cli search command accepts natural language queries and returns matching operations based on API descriptions and parameters. Agents learn about this capability automatically when running --help for the first time.
TypeScript configuration with language server support
The new cloudflare.config.ts format replaces Wrangler's configuration approach with TypeScript-based configuration that both humans and agents can parse and modify. Type checking provides significant benefits for agentic workflows: agents can identify and edit configuration without prior exposure to the format, and LSP-aware tools like Claude Code and Codex gain contextual understanding of the schema, leading to more accurate suggestions.
Some Cloudflare configuration files have been condensed by 40%, shrinking from over 5,000 lines of repeated environment blocks to factory functions that generate each developer's configuration programmatically. A simple Worker with multiple environments can switch between configurations based on a mode argument:
import { bindings, defineConfig } from "cf/config";
import * as entrypoint from "./index.js" with { type: "cf-worker" };
export default defineConfig(({ mode }) => ({
worker: {
name: "example-worker",
entrypoint,
compatibilityDate: "2026-09-27",
env: {
Environment: bindings.text(`This is ${mode} environment`),
},
},
}));
The bindings helper provides a discoverable interface to the entire developer platform. Agents and editors can auto-complete and explore all available bindings—environment variables, storage, databases, queues, and more:
import { bindings, defineConfig } from "cf/config";
export default defineConfig(({ mode }) => ({
worker: {
// ...
env: {
API_URL: bindings.text(
mode === "production"
? "https://example.com"
: "https://staging.example.com",
),
API_TOKEN: bindings.secret(),
CACHE: bindings.kv({
id: mode === "production"
? "production-namespace-id"
: "staging-namespace-id",
}),
DATABASE: bindings.d1({ name: `example-${mode}-database` }),
UPLOADS: bindings.r2({ name: `example-${mode}-uploads` }),
JOBS: bindings.queue < { userId: string } > ({
name: `example-${mode}-jobs`,
}),
AI: bindings.ai(),
SEARCH_INDEX: bindings.vectorize({
name: `example-${mode}-search`,
}),
API: bindings.worker({ worker: `example-${mode}-api` }),
},
},
}));
A triggers helper consolidates route patterns, scheduled tasks, queue handlers, and email triggers into a single configuration block:
import { defineConfig, triggers } from "cf/config";
export default defineConfig({
worker: {
// ...
triggers: [
triggers.fetch({ pattern: "example.com/*" }),
triggers.scheduled({ schedule: "0 * * * *" }),
triggers.queue({ name: "jobs", maxBatchSize: 10 }),
triggers.email({ addresses: ["support@example.com"] }),
],
},
});
The cloudflare.config.ts approach will eventually extend beyond Workers to encompass the entire Cloudflare platform. Future versions will enable type-safe configuration of policies, zones, DNS records, and other services through the same unified file.
Vite as the default development foundation
When Wrangler first launched, Vite did not exist. The tool built its own dev server on port :8787 and relied on esbuild for bundling, requiring modifications to Cloudflare-specific internals like Miniflare. Vite represents a substantial improvement, offering a mature ecosystem of plugins, hot module replacement, and builds powered by the Rust-based Rolldown library for tree-shaking.
cf uses Vite as its default foundation. The Cloudflare Vite Plugin is now the recommended approach for building Workers, whether frontend or backend focused. Combined with the Vitest plugin, it provides a cohesive development and testing environment that mirrors the Workers runtime and grants direct access to bindings and platform APIs.
Most existing Workers will migrate automatically with agent assistance. Those relying on Wrangler's esbuild or Python and Rust Workers will continue to delegate to Wrangler during development and deployment. When the open beta concludes, a final major version of Wrangler will direct users and agents to cf. Cloudflare will maintain Wrangler for 18 months after the beta ends, providing time for migration.
Migration and getting started
Migrating an existing Worker requires running cf migrate. Workers already built with Vite convert to cloudflare.config.ts automatically. Those depending on Wrangler's esbuild continue delegating builds to Wrangler.
New projects can be initialized with cf init for a Hello World example or cf init/deploy to automatically configure a project with the Cloudflare Vite Plugin and generate a configuration file. Static sites require no configuration file and deploy via cf deploy.
cf is open source, and issues can be reported to Cloudflare's GitHub repository.