Cf: The Agentic CLI for the Cloudflare API
Introducing cf: The Agentic CLI for the Cloudflare API
Published September 28, 2026 | By Matt “TK” Taylor and Samuel Macleod
Over the past year, we have witnessed a massive surge in the adoption of AI agents utilizing Wrangler. The data is striking: by March 2026, agents accounted for of all Wrangler usage, a significant jump from the single-digit percentages seen just one year prior.
These agentic users are far more active than humans. On average, they execute nearly double the amount of unique commands daily and are roughly more likely to utilize six or more distinct commands in a session.
The Bottleneck: Scale and Consistency
Despite this growth, Wrangler has a limitation: it only supports roughly 280 operations. Meanwhile, the Cloudflare ecosystem offers thousands.
Earlier this year, we hinted at a solution. Today, we are empowering agents to interact with every single Cloudflare product via a brand-new CLI: cf.
What is cf?
cf is a command-line interface engineered for the future of software engineering—one where agents are primary citizens. It provides bespoke steering and search capabilities, allowing agents to discover the exact command needed for any task.
Key Enhancements
- JSON-First Interface: JSON is now the default. It is
formatted as tablescondensed for agents to save context window tokens, while remaining pretty-printed for human eyes. - TypeScript Configuration: We are introducing
cloudflare.config.tsas the universal configuration format. This brings the rigor of TypeScript and Language Server Protocol (LSP) support to both humans and agents. - Vite Integration: Vite is now the default, offering a superior local development server and a robust plugin ecosystem for framework authors.
Quick Start: You can install the open beta globally right now:
npm i -g cfExample usage:cf d1 list
The Architecture of cf
To move from 280 commands to over 3,000, we couldn't rely on manual coding. Wrangler was built organically, with different teams using different patterns. This led to inconsistent terminology (e.g., comparing d1 info vs. hyperdrive get vs. workflows describe).
To solve this, we created Forge.
The Forge Pipeline
Forge is our unified API generation pipeline. Instead of hand-writing CLI commands, we generate them directly from the OpenAPI schemas that power our documentation and SDKs.
By adding a small amount of metadata to our schemas, Forge automatically produces a standardized CLI. This allows an agent to perform a complex sequence of tasks—deploying a Worker, configuring Cloudflare Access, purchasing a domain, and setting up a WAF—all using one consistent tool.
Comparison: Wrangler vs. cf
| Feature | Wrangler | cf |
|---|---|---|
| Command Scope | operations | operations |
| Default Output | Human-readable tables | Agent-optimized JSON |
| Config Format | .toml, .json, .jsonc | cloudflare.config.ts |
| Dev Server | Legacy/Custom | Vite (Default) |
| Generation | Hand-written | Forge (Schema-driven) |
Designing for the "Unfamiliar" Agent
One might think introducing a new CLI would confuse LLMs that have already "learned" Wrangler from years of blog posts and documentation. However, we believe a clean break is better.
Trying to evolve Wrangler would force agents to reconcile conflicting versions of the same tool. By launching cf, we can provide fresh context via:
- Context Injections
AGENTS.mdfiles appended to the toolset
Optimizing for Tokens
Humans like tables; agents hate them. When using Wrangler, agents frequently append --json and pipe the output to jq to extract data. This is inefficient and consumes unnecessary tokens.
In cf, JSON is the standard. For the vast majority of operations—which will be handled by agents—this is the most efficient path.
Migration and Coexistence
We aren't abandoning Wrangler overnight. The two will coexist based on the project environment:
- Existing Projects: If a project contains
wrangler.jsonc,wrangler.json, orwrangler.toml, continue using Wrangler. - Migration: To move a project to the new system, run
cf migrate. - Discovery: Since
cfcommands differ from Wrangler, usecf --helporcf cli searchrather than guessing.
Important Note for Agents:
If a cf command fails in a non-Wrangler project, do not automatically fall back to npx wrangler without first offering to report the issue.
# Example: Searching for a command
cf cli search "how to manage KV namespaces"
By shifting to an agent-first CLI, Cloudflare is ensuring that the tools used to build the web evolve as fast as the AI agents building it.