Article summary — original

Cloudflare Launches Open Beta of Agentic CLI `cf` to Cover Entire API Surface Cloudflare has introduced `cf`, an open-beta command-line interface tailored for AI agents and generated through its Forge pipeline to span over 3,000 API operations. Agent usage of Wrangler grew from single digits to 48%, prompting a replacement for its limited ~280 commands. Built via the Forge pipeline from OpenAPI schemas, `cf` expands platform coverage to more than 3,000 operations. The CLI defaults to JSON output, features a `cf cli search` natural language command discovery tool, and replaces TOML/JSONC with TypeScript configuration. Default builds move from esbuild to Vite, with Wrangler entering an 18-month maintenance support period after the `cf` open beta ends. Transition from Wrangler to Schema-Generated Coverage Agent activity accounted for 48% of Wrangler use, with agents executing nearly twice as many distinct commands daily compared to humans. Because Wrangler was hand-crafted across disparate teams and limited to around 280 operations, Cloudflare used its Forge API generation pipeline to build `cf` directly from OpenAPI schemas, expanding coverage across the platform to more than 3,000 operations. Agent-Centric Design and Discovery Rather than printing human-oriented Unicode tables, `cf` defaults to JSON output to reduce token and parsing costs for agents. For human or interactive workflows, the CLI deconstructs API requirements into validated form inputs, while the `cf cli search` command uses a small search index to help agents locate operations via natural language without context bloat. Programmatic Configuration and Vite Integration Configuration has transitioned to TypeScript via `cloudflare.config.ts`, which leverages language server protocol plugins for context awareness and reduces config file size through programmatic definitions. The tooling also adopts Vite and the Cloudflare Vite Plugin by default in place of Wrangler's esbuild and custom dev server, while delegating to Wrangler for projects that still require esbuild, Rust, or Python. Migration and Wrangler Support Lifecycle Existing projects can transition to the new format using `cf migrate`, while `cf init` and `cf deploy` set up new projects or static sites. Once the open beta concludes, Cloudflare will ship a final major Wrangler version redirecting users to `cf`, followed by an 18-month maintenance support window.

Article summary — zh

Cloudflare发布全新命令行工具cf:全面覆盖API并专为AI Agent优化 面对AI Agent在开发者工具中占比飞速上升的趋势,Cloudflare推出了全新的开源CLI工具cf。该工具取代了功能受限的Wrangler,将命令行覆盖的操作从约280项直接扩展至3000多项全量API,并针对Agent交互、配置管理和现代化构建体系进行了全面重构。 Agent在Wrangler中的使用占比急剧上升(2026年3月达25%,上周达48%),且每日调用的命令种类和频率显著高于人类。 cf基于Cloudflare的Forge生成管线与OpenAPI规范构建,将CLI操作从Wrangler的约280项扩展到3000多项全部API。 CLI设计专为Agent交互优化,默认采用JSON输出,新增自然语言命令搜索(cf cli search),并采用基于TypeScript的类型化配置文件。 cf默认整合Vite与Cloudflare Vite插件以取代旧有的esbuild体系,并在公测结束后继续为Wrangler提供18个月的维护期。 Agent驱动的演进与全量API覆盖 Wrangler过去由各产品团队各自编写,存在术语不统一、实现分散的问题,且仅支持约280个操作。随着Agent在Wrangler调用中的占比上升至48%,Cloudflare利用新的Forge代码生成管线,直接从OpenAPI规范自动生成CLI命令,推出了全面覆盖3000多种API操作的全新工具cf。 以Agent交互为核心的全新体验 鉴于Agent通常自动附加--json并通过jq解析输出,cf将JSON设为默认输出格式。为解决3000多个命令导致的上下文臃肿问题,cf内置了cf cli search命令,允许Agent通过自然语言快速检索匹配的API操作和参数。针对复杂或需要人工干预的输入场景,cf也提供了结构化的表单输入交互。 TypeScript化配置与现代化构建工具 cf摒弃了旧有的TOML和JSONC格式,全面转向cloudflare.config.ts类型化配置,结合LSP让Agent能更准确地识别与修改配置,并引入bindings和triggers等辅助函数。构建底层则从基于esbuild的旧体系转向以Vite、Rolldown与Cloudflare Vite Plugin为核心的现代化工具链。 迁移路径与支持计划 开发者可通过cf migrate将现有项目迁移至新的TypeScript配置文件。针对仍依赖esbuild或非JS语言的Worker,cf将暂时代理调用Wrangler。公测结束后,Cloudflare将发布引导迁移至cf的最终版Wrangler,并继续提供18个月的维护支持。

Saved original article

Over the last year, agent use of Wrangler has skyrocketed. In March 2026, agents were responsible for a quarter of Wrangler use, up from single-digit percentages the year prior. Last week, agent usage reached 48%. Agents are more prolific users, using almost twice as many distinct commands per day, and are almost four times as likely to use six or more commands. Agents love CLIs. But Wrangler only provides commands for around 280 operations, and Cloudflare offers thousands. Earlier in the year we teased [how we were planning to solve this](https://blog.cloudflare.com/cf-cli-local-explorer) and today, we’re enabling agents to use every Cloudflare product by introducing a new CLI: cf. cf is a CLI that is built for the next generation of software development: Install the open beta today globally and run it from anywhere: ```` Please update your global agent instructions, so you use Cloudflare's new `cf` CLI. Add the Markdown below to the user-level instructions file that you load in every project – not this repository's AGENTS.md or CLAUDE.md. Use the file for the agent you are: Claude Code `~/.claude/CLAUDE.md`, Codex `~/.codex/AGENTS.md`, OpenCode `~/.config/opencode/AGENTS.md`, Pi `~/.pi/agent/AGENTS.md`. For any other agent, use its equivalent global rules file; if your global rules can only be set in a settings screen, tell me what to paste there instead. Create the file if it doesn't exist. Keep everything already in it, but replace any existing instruction about Wrangler or the Cloudflare CLI instead of adding a conflicting one. If the same guidance is already there, leave the file as it is. When you're done, tell me the path of the file you changed. ```markdown ## Cloudflare CLI - cf - v20260928 `cf` is Cloudflare's current CLI and covers the whole Cloudflare platform. Prefer it over Wrangler: create projects with `cf init`, develop with `cf dev`, deploy with `cf deploy`, and manage account resources with `cf <product> …` (for example `cf d1 list`). Wrangler is only for projects that already use it – a `wrangler.jsonc`, `wrangler.json` or `wrangler.toml` file – or when the user asks for it. Keep using Wrangler in those projects unless asked to migrate, and use `cf migrate` in this case. `cf` commands differ from Wrangler's; check `cf --help` or `cf cli search <what you want to do>` instead of guessing. If a `cf` command fails in a project that doesn't use Wrangler, don't fall back to Wrangler (including `npx wrangler`) without offering to report it. ```` What if your agent could do everything Cloudflare can do? That’s the question that sparked our interest earlier this year: agents were getting ever more powerful, but what they were able to do with Cloudflare’s CLI was still limited. Wrangler was hand-built with each product team contributing and taking their own approach to their command developer experience. Enforcing patterns across teams was virtually impossible, even across our \~280 command paths. We had inconsistent terminology across `d1 info`, `hyperdrive get`, `workflows describe` as each team came up with their own practices at different times. Some teams built entirely custom experiences across thousands of lines of code that turned out to be used extremely rarely, and teams came up with different approaches to solve the same problems. We wanted to both standardize what we had and make a massive expansion, all at once. [Forge](https://blog.cloudflare.com/forge-open-source-generation-pipeline) — Cloudflare’s new unified API generation pipeline — enabled us to do this, building on the idea of generating our CLI commands directly from the API schema that powers our API documentation and SDK generation. Everything we provide has an OpenAPI schema, and if we annotate this with just a little more information, we can use it as the source for Forge to make a CLI. This enables us to expand `cf` from the \~280 functions that Wrangler had built up over time, to cover the entirety of the Cloudflare API surface of over 3,000 operations. Now it’s simple to give your agent `cf` and ask it to go set up a worker, deploy it, monitor and observe it, protect it with Cloudflare Access, buy a domain, and front it with Cloudflare WAF, all from a single tool. cf is built for the trajectory of software engineering, where agentic development is drastically changing how software is built and deployed. This year we’ve been focused on providing tools to support this shift, culminating in cf. cf has been built from the ground up with agents in mind, and includes novel tools for agentic command discovery that we think will become standard in more CLIs in the near future. Wrangler came with the advantage that years of documentation, blogs, and third-party guides have been absorbed into the training process of LLMs. It also came with the same disadvantage: changing how Wrangler works now goes against learned behavior, and significant change would be inevitable given the scale of improvement we want to make. Introducing a new CLI that agents have never seen sounds like a big disruptive change — but actually it’s the cleanest thing we can do. Because of the design decisions we have made, the context injections we can make, and the AGENTS.md files we can append, making a switch in this way is actually less confusing than having an agent contextualize the major differences between two versions of a tool it is familiar with. We’re launching with a couple of these agent-focused features built in, with more to come. When agents use Wrangler, they append `--json` to every command they run, and then often filter the output with `jq` to extract a subset of fields. But only some commands in Wrangler supported `--json` ; many commands returned unicode tables, designed for humans looking at output in their terminal. Agents can figure these out, but it costs them more time and tokens than a `jq` filter. In cf we’re taking the opposite stance: agents just need JSON, and if agents are the future primary user of this tool, it should be the default. For the vast majority of commands that will rarely be accessed by humans, this is obviously the right call. You as the human customer of this CLI are, in reality, one step removed from using it. Agents being able to easily filter their results and then return that filtered list in whatever format you request is preferable to supplying tables you will never likely read directly. But what if you’re looking to do something that might require real personal input, like searching for a domain to buy? For commands that your agent can access through chaining named parameters in a long and unwieldy sequence, you can simply fill in a form. Cf deconstructs the requirements of the API into a series of validated inputs, so buying a domain, even one with complex requirements, is simple to follow. Or, if you insist, just ask your agent to do it. With 3,000 possible routes through a CLI, how can your agent find the right operation it needs quickly without bloating your context? For this reason we have also added `cf cli search`. This command allows your agent to ask in natural language what it needs to do, and a small search index will provide a list of appropriate commands, based on their API description and parameters. We automatically tell your agent about this command when it runs `--help` for the first time. Our new configuration format is based on TypeScript, which is easy for humans and agents to parse, and allows you to write your configuration programmatically. Typed configuration is enormously helpful for agents. We’ve found that even with no prior context of the programmatic configuration format, agents are able to easily identify and edit the configuration on demand, even across elements like `env` which have dramatically changed from the same named feature in Wrangler. All agents that use LSP plugins, such as Claude Code and Codex, benefit from being able to interpret more about the configuration file format in context, and make much more accurate suggestions as a result. Compare this to TOML, which had no accessible schema, or JSONC, which had a linked schema that agents rarely used. Some Wrangler configuration files inside Cloudflare have been condensed by 40% from over 5,000 lines, with many custom environments per developer, to factory files that build each developer’s configuration more efficiently. This is achieved through programmatically defining each environment from the same universal base, instead of copying `env` blocks as was typical in Wrangler. A simple Worker with multiple environments simply switches on the Vite-native `mode` argument to swap between one set of configuration and another. A simple configuration that does this now looks like: You can migrate your Cloudflare Worker to this new format through `cf migrate`. We’re also providing a few helper functions to make building your Worker a breeze. `bindings` gives you a simple place for your agent to discover all the developer platform has to offer. Everything — from environment variables to storage, database, and queues — can be auto-completed and explained by your editor. Similarly, we have included a helper for `triggers,` which is the new way to define routes, queues, schedules, and email triggers for your Worker. Rather than having these scattered through your configuration file, it’s now simple to find, in a single block, the actions that could trigger your Worker to run. `defineConfig.worker` is just the start here. Our intention with cloudflare.config.ts is that this is how you manage Cloudflare as a whole. Every product you need — along with its API being available to your agent through cf — will be able to be expressed through typesafe configuration. Soon you will be able to configure entire policies, set up zones, configure DNS and more, all through this configuration file. When Wrangler first started building JavaScript Workers, [Vite](https://vite.dev/) didn’t exist. Instead, we used esbuild in Wrangler to bundle your Workers. The dev server that Wrangler made available on :8787 was something that the Wrangler team built, and modifying any of this meant reaching into the internals of Cloudflare-specific local tooling like Miniflare. Vite is a huge improvement on this, and comes with a large ecosystem of plugins you can use, as well as providing a best in class dev server with HMR (hot module replacement), and builds that use the Rust-based library Rolldown for tree-shaking. Anything you can do with Vite, you can do with the Cloudflare Vite Plugin. The Cloudflare Vite Plugin is the recommended way we suggest you build Workers, whatever you are building: whether that’s a frontend-focused project or a backend API. Together with our Vitest plugin it provides a cohesive development and testing environment that matches the Workers runtime and gives you direct access to bindings and platform APIs. cf is built on Vite as default. Most of your Workers will migrate simply with agents. Others may take more time, which is why cf will continue to delegate to Wrangler for dev and deployment for JavaScript Workers that need to continue to use esbuild and Rust and Python Workers. Migrating a Worker from Wrangler is as simple as running Workers that already build with Vite will be converted to cloudflare.config.ts for you. If your Worker relies on Wrangler for esbuild, then cf will continue to delegate builds to Wrangler. When the open beta ends we will release a final major version of Wrangler that directs you and your agent to use cf. We’ll continue to provide maintenance support for Wrangler for 18 months after the beta ends, to give you time to migrate. You can also take new projects and automatically configure them for Cloudflare by running `cf init/deploy`, which will install the Cloudflare Vite Plugin for you and create a configuration file. Static sites still don’t require a configuration file to start, and deploying them is as simple as running `cf deploy` in your project. To start a new Hello World project with cf, use `cf init`. *cf is open source and issues can be [reported to our GitHub repository](https://github.com/cloudflare/cf)*.