Cloudflare Has Announced Forge: A New Approach for Developing SDKs, CLIs, Docs, and Libraries
Forge matters less as another code generator than as an attempt to move API-consumer tooling into the same engineering control plane as the API itself. For teams managing large OpenAPI estates, the practical shift is architectural: SDKs, CLIs, docs, and runtime helpers stop being downstream artefacts maintained by separate release processes and become testable outputs of the spec repository. That can reduce drift, but only if the specification is treated as a governed product rather than a loose description.
The operational implication is that CI becomes the enforcement point for contract quality. That is useful, but it also raises the bar for schema discipline, review workflows, and backward-compatibility policies. Once preview builds are generated on every change, poorly modelled operations, inconsistent naming, ambiguous lifecycle states, or weak deprecation metadata become visible immediately across every generated surface. In practice, Forge-like pipelines will reward organisations that standardise API style guides, overlay strategy, and ownership boundaries before scaling generation across teams.
There is also a migration question hidden underneath the announcement. If a platform has years of versioning ambiguity, generating cleaner clients does not by itself solve contract debt; it exposes it. Teams evaluating this approach should look beyond language support and ask whether their current specs are accurate enough to drive production CLIs, whether overlays will become a temporary patch layer or a permanent dependency, and how generated outputs will be versioned, tested, and distributed to internal and external consumers.
For enterprise API programs, the broader lesson is clear: generation pipelines are becoming part of platform engineering, not just developer convenience tooling.
Cloudflare has announced Forge, an open-source, pluggable generation pipeline that anyone can deploy and run for free. According to the official Forge GitHub repo, “Forge is a schema-first OpenAPI code generation and surface tooling framework. It provides a plugin-based architecture for resolving OpenAPI 3.x specifications, applying JSONPath-based overlays, and generating typed SDKs, CLI interfaces, runtime helpers, and documentation.”
Forge was born out of the need to treat agents as customers. With an API that has over 3,500 operations and hundreds of services that power its APIs, Cloudflare saw a need to simplify this process. To that end, the company decided it was time to build a CLI for the entire Cloudflare API, which included SDKs and API docs. They needed a code gen pipeline capable of doing this at scale while offering enough flexibility to work across multiple languages and workflows.
To help reduce the overhead between teams, Cloudflare needed to be able to use a preview build before merging changes and shipping to customers, which would ensure the generation pipeline didn’t break. They needed something that could be extended to generate SDKs, Cap’n Web, MCP, and beyond.
And so, they created a tool to fix and avoid all of those problems. That tool is Forge.
Forge runs in CI to lint every change and generate preview builds with only specific changes highlighted that can be installed and tested. Prior to Forge, a workflow might look like: Feature API spec -> PR merged -> Aggregate API spec -> PR merged -> Centralized config -> PR merged -> SDK generator -> Failure detected.
With Forge, it’s more like Feature API spec -> Forge in CI -> Failure detected.
With a dramatically truncated workflow, development becomes more reliable and efficient.
Forge even makes it possible to use an OpenAPI spec and generate Cap’n Web directly. Cap’n Web is Cloudflare’s RPC system that allows TypeScript to call a remote API as if it were local.
Forge is open-source and free, runs directly in CI on team API repos, generates custom copies of CLIs, docs, and SDKs, supports OpenAPI input (with more formats planned), allows chaining targets together, and clearly defines API operations, lifecycle states, and deprecations.
“Forge is also setting us up for better API versioning. Cloudflare’s v4 API has been the one major version of our API for 10 years,” wrote Dimitri Mitropoulos, Matt “TK” Taylor, and Samuel Macleod on the official Forge announcement. They continued, “Since then, it appears like we haven’t launched any new major versions, but by SemVer definitions we’ve made quite a few changes worthy of a new major version. At the same time, several operations across our API feature internal ‘v2’ tags or ‘beta’ identifiers that have long outlived that part of the product’s lifecycle.”
Although Forge is still in the early stages of development, it can already generate the necessary output for cf (the agentic CLI used for the entire Cloudflare API). You can view and download the code for Forge from the official Forge GitHub repository.
Enjoyed this article? Sign up for our newsletter to receive regular insights and stay connected.
