Build3 publishers3 min readPublished
After Stainless's shutdown, Cloudflare open-sources the generator behind its cf CLI
Cloudflare open-sourced Forge, an Apache 2.0 pipeline that generates SDKs, CLIs and docs from an API definition. Teams that lost Stainless's hosted generator can run it themselves, though Cloudflare so far uses it only for its cf CLI.
The Engineer · Build desk

What happened
- Anthropic acquired Stainless on May 18, and Stainless then said it would wind down its products, including the SDK generator that kept client libraries current.
- Customers including OpenAI, Google and Cloudflare kept the SDKs already generated for them but lost the service that regenerated them as their APIs changed.
- Google said on September 17 that it had partnered with Speakeasy to open-source Speakeasy's OpenAPI code-generation suite under the AGPLv3 license.
- Forge grew out of the TypeScript-based schema and generation system Cloudflare built for the April technical preview of its unified cf command-line interface.
Compiled by The EngineerSomething wrong?How this is made
Why it matters
- exposure Any API vendor on a hosted generator has tied its SDK release process to whoever owns that vendor, and an acquisition can freeze its client libraries at their last generated version.
- decision Teams replacing a hosted generator now have to choose a license along with a tool, because the two open generators released after the Stainless shutdown carry different terms.
- cost Self-hosting moves the generator's upkeep, including transformers, upgrades and CI time, onto the API team that used to pay a vendor to carry it.
- constraint Teams that need multi-language client libraries must judge Forge's SDK generators on their own before Cloudflare itself ships SDKs from them.
Cloudflare's post describes a problem with timing: when a break gets found. "One team would merge a change that inadvertently would break the generation pipeline, another team would discover this at release time," the company wrote [11]. Generation ran after changes merged. The first team to see a broken build was often not the team that caused it. The API involved has more than 3,500 operations, served by hundreds of services written in Rust, Go, TypeScript and Python [10].
In my view this is the right design for an API owned by many teams. Forge moves generation to before the merge. It runs in CI on each team's API repos. It lints every change and builds preview versions of the CLI, docs and SDKs with that change highlighted, and an engineer can install those previews and test them [12]. Cloudflare says the premise is the same as Workers Previews, applied to SDK generation [13].
Outputs are pluggable. Forge ships generators for CLIs, SDKs and docs, and its transformers can be chained so one output feeds the next [14]. Cloudflare's example takes an OpenAPI spec and emits bindings for Cap'n Web, its RPC system that lets TypeScript call a remote API as if it were a local method [15]. The post also names TanStack Query bindings, Zod or Valibot schemas and MCP servers as targets [16].
The license is the part that deals with the Stainless failure. Forge is Apache 2.0, and a team can run and modify it privately without paying Cloudflare [2]. "We believe that building tools for APIs is a core part of the Internet, and you should be able to do that without needing a SaaS product," wrote the authors, Dimitri Mitropoulos, Matt Taylor and Samuel MacLeod [17].
Cloudflare's post says it relied on several hosted products in production and that "some have shut down entirely" [18]. The New Stack identifies Stainless as one of them [19]. Google lost the same service just as it was preparing to launch a new API [20]. "This sudden disruption highlighted that proprietary, closed-source generators create unacceptable platform risk," Google wrote [7].
Cloudflare's numbers describe Cloudflare's workload. The coordination argument carries over if your API is also spread across many repos and teams that merge on their own schedules. A single team with one spec in one repo has less of that problem. For that team the gain is mostly ownership: a generator in its own CI keeps running whatever happens to a vendor.
The production record is short. Cloudflare's API documentation and SDKs are due to move onto Forge over the coming months [3]. The first cf preview covered only a small subset of Cloudflare products, though the company said it was testing a version that spanned its whole API [9]. Cloudflare did not say how much setup a team outside the company needs before Forge produces its first SDK.
What to watch
- Whether Cloudflare's own SDKs and API documentation actually ship from Forge within the promised coming months.
- Which former Stainless customers, such as OpenAI, adopt Forge, adopt the AGPLv3 Speakeasy suite, or build their own generator.
- Whether Cloudflare documents inputs beyond OpenAPI and a setup path for teams outside the company.