logo
Kurashizu Blogwhere ideas flow
  • Home
  • News
  • Blog
  • About
  • Home
  • News
  • Blog
  • About

© 2026 Kurashizu. All rights reserved.

Admin·New Post·Service Status
Powered by Cloudflare·30.10.26
← Back to news

Cf: The Agentic CLI for the Cloudflare API

Original article
blog.cloudflare.com|25 points|8 comments|by macleos|Sep 28, 2026

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 ≈25%\approx 25\%≈25% 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 4×4\times4× 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 tables condensed for agents to save context window tokens, while remaining pretty-printed for human eyes.
  • TypeScript Configuration: We are introducing cloudflare.config.ts as 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 cf Example 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

FeatureWranglercf
Command Scope∼280\sim 280∼280 operations3,000+3,000+3,000+ operations
Default OutputHuman-readable tablesAgent-optimized JSON
Config Format.toml, .json, .jsonccloudflare.config.ts
Dev ServerLegacy/CustomVite (Default)
GenerationHand-writtenForge (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:

  1. Context Injections
  2. AGENTS.md files 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, or wrangler.toml, continue using Wrangler.
  • Migration: To move a project to the new system, run cf migrate.
  • Discovery: Since cf commands differ from Wrangler, use cf --help or cf cli search rather 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.