Skip to content
INTERNET INFRASTRUCTURE & NETWORKS

Cloudflare Introduces ‘cf’, a New CLI Built to Give AI Agents Full Access to Its API Ecosystem

The landscape of software development is undergoing a profound transformation, driven increasingly by autonomous agents and artificial intelligence. Recognizing this shift, Cloudflare has announced the open beta release of a brand-new command-line interface, simply named “cf,” designed from the ground up to support the next generation of AI-driven software engineering. The launch comes in response to soaring agent utilization of Cloudflare’s existing tooling, marking a strategic pivot to accommodate how developers—and the automated agents assisting them—interact with cloud infrastructure.

Over the past year, the adoption of Cloudflare’s traditional developer tool, Wrangler, by AI agents has skyrocketed. In March 2026, autonomous agents were responsible for a quarter of all Wrangler usage, a dramatic increase from the single-digit percentages recorded just a year prior. By last week, that figure had climbed to 48 percent. Furthermore, data shows that agents are exceptionally prolific users compared to their human counterparts. Agents utilize almost twice as many distinct commands per day and are nearly four times as likely to execute six or more unique commands during a session.

Despite their affinity for command-line interfaces, agents quickly ran up against the boundaries of Wrangler. While agents clearly love interacting via the terminal, Wrangler historically provided commands for only around 280 operations, whereas Cloudflare’s expansive platform offers thousands of potential capabilities. To bridge this gap, Cloudflare teased a solution earlier in the year and is now delivering on that promise with the introduction of "cf," a tool engineered to unlock the entirety of Cloudflare’s vast product ecosystem for AI agents.

cf Gives Your Agent Access to the Entire Cloudflare API

The fundamental question that sparked the development of the new CLI was straightforward: what if an autonomous agent could do everything that Cloudflare itself can do? As agents grew increasingly powerful and sophisticated throughout the year, the limitations of the existing CLI constrained what they could accomplish across Cloudflare’s services.

Wrangler had been built organically over time, with individual product teams contributing their own approaches and command developer experiences. Enforcing uniform design patterns across these disparate teams proved virtually impossible, resulting in inconsistencies even within its roughly 280 command paths. Terminology varied unpredictably across commands like d1 info, hyperdrive get, and workflows describe, as each engineering group improvised practices at different stages. Some teams built heavily customized experiences comprising thousands of lines of code that ultimately saw very little usage, while others arrived at divergent solutions for identical problems.

Cloudflare sought a way to simultaneously standardize its existing capabilities and execute a massive expansion. This was made possible by Forge, Cloudflare’s new unified API generation pipeline. Building upon the concept of generating CLI commands directly from the OpenAPI schemas that already power Cloudflare’s API documentation and SDK generation, Forge allowed the company to scale up efficiently. By annotating the existing OpenAPI schemas with a modest amount of additional metadata, Cloudflare transformed them into the foundational source for the new CLI.

This architectural overhaul enables "cf" to expand far beyond the roughly 280 functions previously supported by Wrangler, covering the entire Cloudflare API surface area of more than 3,000 operations. Consequently, developers can now simply provide "cf" to their autonomous agent and issue complex, multi-step instructions—such as setting up a Worker, deploying it, establishing monitoring and observation, securing it with Cloudflare Access, purchasing a domain, and placing it behind the Cloudflare Web Application Firewall—all through a single, unified interface.

Building for an Agent That Has Never Used cf

The introduction of "cf" aligns directly with the trajectory of modern software engineering, where agentic development is radically altering how applications are built, tested, and deployed. Throughout the year, Cloudflare’s tooling efforts have culminated in this new release, which incorporates novel mechanisms for agentic command discovery intended to set a new standard for command-line interfaces.

While Wrangler benefited from years of accumulated documentation, blog posts, and third-party guides that had been absorbed into the training data of large language models, that same history presented a distinct disadvantage. Altering how Wrangler operated would inevitably conflict with the learned behaviors of existing LLMs, creating friction given the scale of the improvements Cloudflare intended to make.

Deploying an entirely new CLI that agents have initially never seen might appear disruptive, but engineers determined it was the cleanest path forward. Thanks to deliberate design decisions, targeted context injections, and appended AGENTS.md files, making a clean break to a modern tool is actually less confusing for an agent than attempting to reconcile major behavioral differences across multiple versions of a familiar legacy tool. The launch features several of these agent-centric capabilities built directly into the core experience, with more planned for the future.

Agents Need to Filter JSON, Not Look at Tables

Traditional command-line utilities have long been optimized for human readability, presenting data in formatted terminal tables. However, when autonomous agents interacted with Wrangler, they routinely appended --json to every command, subsequently piping the output through jq or similar utilities to isolate specific fields. Many Wrangler commands lacked native JSON support, returning unicode tables designed solely for human eyes. While capable of parsing these tables, agents expended valuable processing time and context tokens compared to direct JSON filtering.

With "cf," Cloudflare has inverted that paradigm. Recognizing that agents represent the primary future user base of the tool, raw JSON output has been made the default behavior. For the vast majority of operations that are infrequently accessed directly by humans, providing machine-readable data by default is the logical engineering choice. Human customers utilizing the CLI are essentially one step removed from the direct output; enabling agents to swiftly filter results and return data in whichever format a user requests is far more efficient than generating terminal tables that humans rarely read.

At the same time, scenarios requiring nuanced personal input—such as searching through a large pool of available domains to purchase—are addressed through structured fallback mechanisms. "cf" systematically deconstructs complex API requirements into a series of validated inputs, simplifying tasks that would otherwise require chaining long sequences of named parameters, though users can still choose to let their agents handle the entire sequence autonomously.

Your Agent Can Find the Right Command Itself

Navigating roughly 3,000 possible routes within a single command-line interface presents a significant challenge for an AI agent attempting to locate the correct operation without exhausting its available context window. To solve this, Cloudflare integrated a dedicated command search utility directly into the CLI.

The cf cli search command allows an agent to describe what it needs to accomplish using natural language. A lightweight local search index then scans available operations, returning a relevant list of appropriate commands derived from official API descriptions and parameters. To ensure seamless discovery, the CLI automatically informs the agent about this search capability the first time it executes the --help flag.

Configuration That Type-Checks Your Agent

The configuration architecture of "cf" represents another major departure from legacy tooling, shifting to a format based on TypeScript. This approach is easily parsed by both humans and machines, enabling developers and their automated agents to write and modify configuration programmatically.

Typed configurations offer immense advantages for AI agents. Even without prior context regarding the specific programmatic configuration schema, agents demonstrate a strong ability to accurately identify and edit configurations on demand, even across elements that differ significantly from similarly named features in Wrangler. Development environments equipped with Language Server Protocol (LSP) plugins, such as Claude Code and Codex, can interpret the configuration file format deeply within context, resulting in vastly more accurate code suggestions.

This stands in sharp contrast to legacy formats like TOML, which lacked accessible schemas, or JSONC, where linked schemas were rarely utilized by agents. Internal testing at Cloudflare showed that some complex Wrangler configurations were condensed by up to 40 percent—shrinking from over 5,000 lines characterized by repetitive environment blocks—down to streamlined factory files that construct configurations programmatically from a universal base.

Rather than duplicating environment blocks, a simple Worker featuring multiple environments can now toggle behavior dynamically using Vite-native mode arguments. Cloudflare provides helper functions designed to streamline this process further. The bindings helper consolidates access to the developer platform, allowing editors to auto-complete and explain everything from environment variables and storage to databases and message queues. Similarly, a dedicated triggers helper centralizes route definitions, cron schedules, queue bindings, and email triggers into a single, cohesive configuration block rather than scattering them across disparate files.

Cloudflare’s broader vision for this configuration file is to serve as the unified management plane for the entire platform. As additional product APIs are integrated into "cf," developers will be able to express entire security policies, configure network zones, manage DNS records, and orchestrate other services through the same type-safe configuration format.

A Best-in-Class Development Experience

When Wrangler was originally developed to build JavaScript Workers, the modern frontend tooling ecosystem looked vastly different, and packaging tools like Vite did not yet exist. Wrangler relied on esbuild for bundling, while its local development server running on port 8787 was custom-built by the internal team, tying modifications directly into platform-specific local runtime tools like Miniflare.

The adoption of Vite as the default foundation for "cf" introduces significant performance improvements, including hot module replacement (HMR), tree-shaking powered by the Rust-based Rolldown library, and a robust ecosystem of community plugins. The official Cloudflare Vite Plugin, paired with corresponding Vitest support, provides a cohesive development and testing environment that mirrors the production Workers runtime while granting direct access to platform bindings.

While "cf" relies on Vite by default, Cloudflare has ensured a smooth transition path. Projects that require continued use of esbuild, Rust, or Python will see "cf" seamlessly delegate build and deployment operations to Wrangler during the interim period.

Migrating from Wrangler

Transitioning existing projects from Wrangler to the new toolchain has been designed to be frictionless. Migrating an existing Worker involves running a straightforward migration command, which automatically converts projects already utilizing Vite to the new TypeScript configuration format. For projects still relying on esbuild via Wrangler, the CLI will continue to handle builds by delegating appropriately.

Once the open beta period concludes, Cloudflare plans to release a final major version of Wrangler that guides users and their agents toward "cf." To ensure teams have adequate time to adapt their codebases, maintenance support for Wrangler will continue for 18 months following the end of the beta phase.

For new development initiatives, projects can be automatically initialized and configured for Cloudflare by executing simple initialization commands that install the Vite plugin and generate the necessary configuration files. Static sites continue to operate without requiring explicit configuration files, allowing rapid deployment directly from the project directory. The open-source project welcomes community feedback, and issues can be reported directly through the official GitHub repository.

Leave a Reply

Your email address will not be published. Required fields are marked *