Cloudflare has an unlimited API floor. We now have over 100 merchandise, and practically 3,000 HTTP API operations.
More and more, brokers are the first buyer of our APIs. Builders convey their coding brokers to construct and deploy purposes, brokers, and platforms to Cloudflare, configure their account, and question our APIs for analytics and logs.
We wish to make each Cloudflare product accessible in the entire methods brokers want. For instance, we now make Cloudflare’s total API accessible in a single Code Mode MCP server that makes use of lower than 1,000 tokens. There’s much more floor space to cowl, although: CLI instructions. Employees Bindings — together with APIs for native growth and testing. SDKs throughout a number of languages. Our configuration file. Terraform. Developer docs. API docs and OpenAPI schemas. Agent Abilities.
In the present day, lots of our merchandise aren’t accessible throughout each one in every of these interfaces. That is significantly true of our CLI — Wrangler. Many Cloudflare merchandise haven’t any CLI instructions in Wrangler. And brokers love CLIs.
So we’ve been rebuilding Wrangler CLI, to make it the CLI for all of Cloudflare. It supplies instructions for all Cloudflare merchandise, and allows you to configure them collectively utilizing infrastructure-as-code.
In the present day we’re sharing an early model of what the subsequent model of Wrangler will seem like as a technical preview. It’s very early, however we get the most effective suggestions once we work in public.
You’ll be able to attempt the Technical Preview immediately by working npx cf. Or you’ll be able to set up it globally by working npm set up -g cf.
Proper now, cf supplies instructions for only a small subset of Cloudflare merchandise. We’re already testing a model of cf that helps everything of the Cloudflare API floor — and we will probably be deliberately reviewing and tuning the instructions for every product, to have output that’s ergonomic for each brokers and people. To be clear, this Technical Preview is only a small piece of the longer term Wrangler CLI. Over the approaching months we’ll convey this along with the components of Wrangler you already know and love.
To construct this in a manner that retains in sync with the fast tempo of product growth at Cloudflare, we needed to create a brand new system that enables us to generate instructions, configuration, binding APIs, and extra.
Rethinking schemas and our code technology pipeline from first ideas
We already generate the Cloudflare API SDKs, Terraform supplier, and Code Mode MCP server based mostly on the OpenAPI schema for Cloudflare API. However updating our CLI, Employees Bindings, wrangler.jsonc configuration, Agent Abilities, dashboard and docs remains to be a handbook course of. This was already error-prone, required an excessive amount of backwards and forwards, and wouldn’t scale to assist the entire Cloudflare API within the subsequent model of our CLI.
To do that, we wanted greater than might be expressed in an OpenAPI schema. OpenAPI schemas describe REST APIs, however now we have interactive CLI instructions that contain a number of actions that mix each native growth and API requests, Employees bindings expressed as RPC APIs, together with Agent Abilities and documentation that ties this all collectively.
We write a whole lot of TypeScript at Cloudflare. It’s the lingua franca of software program engineering. And we maintain discovering that it simply works higher to precise APIs in TypeScript — as we do with Cap n’ Internet, Code Mode, and the RPC system constructed into the Employees platform.
So we launched a brand new TypeScript schema that may outline the total scope of APIs, CLI instructions and arguments, and context wanted to generate any interface. The schema format is “just” a set of TypeScript sorts with conventions, linting, and guardrails to make sure consistency. However as a result of it’s our personal format, it may simply be tailored to assist any interface we want, immediately or sooner or later, whereas nonetheless additionally with the ability to generate an OpenAPI schema:
So far most of our focus has been at this layer — constructing the machine we wanted, in order that we will now begin constructing the CLI and different interfaces we’ve needed for years to have the ability to present. This lets us begin to dream greater about what we might standardize throughout Cloudflare and make higher for Brokers — particularly in the case of context engineering our CLI.
Brokers and CLIs — consistency and context engineering
Brokers count on CLIs to be constant. If one command makes use of because the syntax for getting details about a useful resource, and one other makes use of , the agent will count on one and name a non-existent command for the opposite. In a big engineering org of lots of or hundreds of individuals, and with many merchandise, manually implementing consistency via evaluations is Swiss cheese. And you’ll implement it on the CLI layer, however then naming differs between the CLI, REST API and SDKs, making the issue arguably worse.
One of many first issues we’ve carried out is to begin creating guidelines and guardrails, enforced on the schema layer. It’s at all times get, by no means data. All the time --force, by no means --skip-confirmations. All the time --json, by no means --format, and at all times supported throughout instructions.
Wrangler CLI can be pretty distinctive — it supplies instructions and configuration that may work with each simulated native assets, or distant assets, like D1 databases, R2 storage buckets, and KV namespaces. This implies constant defaults matter much more. If an agent thinks it’s modifying a distant database, however is definitely including information to native database, and the developer is utilizing distant bindings to develop regionally in opposition to a distant database, their agent gained’t perceive why the newly-added information aren’t displaying up when the agent makes a request to the native dev server. Constant defaults, together with output that clearly indicators whether or not instructions are utilized to distant or native assets, guarantee brokers have express steerage.
Native Explorer — what you are able to do remotely, now you can do regionally
In the present day we’re additionally releasing Native Explorer, a brand new function accessible in open beta in each Wrangler and the Cloudflare Vite plugin.
Native Explorer helps you to introspect the simulated assets that your Employee makes use of when you find yourself growing regionally, together with KV, R2, D1, Sturdy Objects and Workflows. The identical issues you are able to do by way of the Cloudflare API and Dashboard with every of those, you too can do solely regionally, powered by the identical underlying API construction.
For years we’ve made a guess on absolutely native growth — not only for Cloudflare Employees, however for the complete platform. If you use D1, regardless that D1 is a hosted, serverless database product, you’ll be able to run your database and talk with it by way of bindings solely regionally, with none additional setup or tooling. Through Miniflare, our native growth platform emulator, the Employees runtime supplies the very same APIs in native dev as in manufacturing, and makes use of a neighborhood SQLite database to supply the identical performance. This makes it straightforward to put in writing and run checks that run quick, with out the necessity for community entry, and work offline.
However till now, figuring out what knowledge was saved regionally required you to reverse engineer, introspect the contents of the .wrangler/state listing, or set up third-party instruments.
Now everytime you run an app with Wrangler CLI or the Cloudflare Vite plugin, you may be prompted to open the native explorer (keyboard shortcut e). This supplies you with a easy, native interface to see what bindings your Employee presently has hooked up, and what knowledge is saved in opposition to them.
If you construct utilizing Brokers, Native Explorer is a good way to grasp what the agent is doing with knowledge, making the native growth cycle rather more interactive. You’ll be able to flip to Native Explorer anytime you might want to confirm a schema, seed some take a look at information, or simply begin over and DROP TABLE.
Our purpose right here is to supply a mirror of the Cloudflare API that solely modifies native knowledge, in order that all your native assets can be found by way of the identical APIs that you just use remotely. And by making the API form match throughout native and distant, once you run CLI instructions within the upcoming model of the CLI and go a --local flag, the instructions simply work. The one distinction is that the command makes a request to this native mirror of the Cloudflare API as a substitute.
Beginning immediately, this API is obtainable at /cdn-cgi/explorer/api on any Wrangler- or Vite Plugin- powered utility. By pointing your agent at this tackle, it would discover an OpenAPI specification to have the ability to handle your native assets for you, simply by speaking to your agent.
Inform us your hopes and goals for a Cloudflare-wide CLI
Now that now we have constructed the machine, it’s time to take the most effective components of Wrangler immediately, mix them with what’s now potential, and make Wrangler the most effective CLI potential for utilizing all of Cloudflare.
You’ll be able to attempt the technical preview immediately by working npx cf. Or you’ll be able to set up it globally by working npm set up -g cf.
With this very early model, we would like your suggestions — not nearly what the technical preview does immediately, however what you need from a CLI for Cloudflare’s total platform. Inform us what you want was a straightforward one-line CLI command however takes a couple of clicks in our dashboard immediately. What you want you possibly can configure in wrangler.jsonc — like DNS information or Cache Guidelines. And the place you’ve seen your brokers get caught, and what instructions you want our CLI offered in your agent to make use of.
Leap into the Cloudflare Builders Discord and inform us what you’d like us so as to add first to the CLI, and keep tuned for a lot of extra updates quickly.
Due to Emily Shen for her useful contributions to kicking off the Native Explorer mission.



