Cloudflare Open-Sources Forge SDK Generator After Anthropic Shut Down Stainless
TL;DR
Cloudflare today open-sourced Forge, a pluggable CI pipeline that turns an OpenAPI spec into SDKs, CLIs, and docs, under Apache 2.0. It already generates the output behind cf, the "agentic CLI for the entire Cloudflare API" that shipped the same day. The context is the story: Cloudflare's TypeScript SDK was generated with Stainless, and Stainless stopped taking new SDKs the day it joined Anthropic in May. Google and Speakeasy open-sourced a replacement generator on September 17. Cloudflare is the second to answer the same way. The catch for you: nothing is on npm yet, and eight of the nine SDK languages still run through Fern's generators in Docker.
How we got here
On May 18, Anthropic announced it had acquired Stainless, the New York startup that has generated every official Anthropic SDK since the API's early days. Terms were not disclosed; reports put the price above $300 million. The same day, Stainless's own post said it was winding down all hosted products, including the SDK generator: "Starting today, new signups, projects, and SDKs will not be available." Customers were pointed at a transition page.
Stainless says roughly a quarter of professional developers worldwide have used an SDK or docs site it produced. That customer list included Anthropic's direct competitors. Cloudflare's TypeScript SDK README still reads "It is generated with Stainless." Nothing concentrates the mind like learning your SDK factory now belongs to a model lab.
Google went first. Its September 17 post is unusually blunt: "In May 2026, right as we were gearing up for Google I/O and the General Availability of the Interactions API, the SDK generation provider we were using was acquired and abruptly announced its shutdown." Google moved its GenAI SDKs to Speakeasy, which in turn released its OpenAPI generation suite under AGPL-3.0, covering Python, TypeScript, Go, Java, C#, PHP, and Ruby.
Cloudflare's launch post never names Stainless. It says Cloudflare "tried several hosted products that attempt to solve this, and relied on some in production. None of them solved this problem for us, and some have shut down entirely." The subtext is not subtle.
What Forge actually is
Cloudflare's API has over 3,500 operations, backed by hundreds of services written in Rust, Go, TypeScript, and Python. Forge runs in CI on each team's API repo. Per the launch post, it "lints every change, and then generates preview builds of the CLI, docs, and SDKs with just your changes highlighted that you can install to test." So a team changing one endpoint gets an installable CLI and SDK preview on the pull request, not a surprise three weeks later.
The repo is a TypeScript monorepo. The pieces:
@cloudflare/forge: the core engine. An OpenAPI 3.x resolver with$refdereferencing, a typed schema model, a JSONPath overlay runner, and a plugin lifecycle ofinit,transform,finalize.@cloudflare/forge-transformer-sdk-ts: a standalone TypeScript SDK generator for any bundled OpenAPI spec.astro-fernandfern-forge: an Astro engine for rendering API reference docs.cloudflare-forge-sdk-{lang}: workspace wrappers for Python, Go, Java, PHP, C#, Ruby, Rust, and Swift.
The overlay step is the part worth stealing even if you never run Forge. JSONPath overlays let a team patch the spec (rename a method, hide an internal field, attach CLI hints) without editing the source OpenAPI document that a hundred services emit. Think of it as a transparency sheet laid over a map: you draw the new roads on the plastic, and the printed map underneath never changes.
Why agents are the reason this exists
Cloudflare frames Forge as an agent problem, not a docs problem: "We built Forge because we needed it ourselves in order to treat agents as our customers." CLIs and MCP servers with matching docs are, in the post's words, "table stakes for every product." Outputs can chain, so one spec can feed generated Cap'n Web RPC bindings, TanStack Query bindings, or an MCP server.
That is the same bet Anthropic made when it bought Stainless. Anthropic's announcement quotes platform engineering head Katelyn Lesse: "Agents are only as useful as what they can connect to." The generator that decides what an agent can call is now strategic infrastructure, which is exactly why rivals do not want to rent it from each other.
What the repo reveals that the blog does not
Read packages/cloudflare-fern-config/fern/generators.yml and the picture gets more honest. The TypeScript SDK that feeds cf is generated by Fern's fernapi/fern-typescript-sdk generator, pinned at version 3.80.1, and the other eight languages come from Fern generator groups too. Fern is Apache 2.0, so this is still fully open, but Forge is an orchestration layer over someone else's code generators, not a from-scratch replacement for Stainless.
The config comments are a nice window into generating SDKs at Cloudflare's scale:
- Cloudflare's intermediate representation is about 242 MB, and Node "exits 133 on it with the default max-old-space-size," so the build retags a heap-tuned wrapper over the official Fern image.
- The generated TypeScript tree is roughly 18k files, and Biome was too slow on it, so formatting and linting run on oxfmt and oxlint.
- Cloudflare's response envelope still has to be unwrapped by hand-written fetcher code, because Fern has no plugin for it.
The monorepo's AGENTS.md also sets a rule you should copy: generic packages (forge, astro-fern) must stay free of Cloudflare-specific dependencies, and everything Cloudflare-flavored carries a cloudflare-* prefix. That boundary is what makes the "anyone can run it" claim real rather than aspirational.
Can you use it today?
Partly. The README documents a CLI path:
pnpm add --save-dev @cloudflare/forge-transformer-sdk-ts
pnpm exec forge openapi.json --out ./generated
As of this writing, neither @cloudflare/forge nor @cloudflare/forge-transformer-sdk-ts resolves on the npm registry (both return 404), and every package is at 0.1.0. The public git history is a single commit, "Initial public release of Forge," dated today. The README also notes that "full generation requires Docker." For now, you clone, pnpm install, and build from source.
The language wrappers are marked private in their package.json files. Cloudflare's post says published SDKs in TypeScript, Rust, Python, Go, PHP, and Terraform are coming, with Forge also taking over its API docs in the months ahead. Treat today's release as a working reference architecture with a TypeScript path, not a drop-in Stainless replacement for a nine-language SDK program.
Picking a lane if Stainless left you stranded
- Want permissive licensing and control over the pipeline? Forge (Apache 2.0) plus Fern's generators. Expect to own Docker, heap tuning, and some glue code.
- Want the broadest ready-made language set? Speakeasy's suite ships seven languages today, but AGPL-3.0 will make some legal teams nervous if they modify and host it.
- Already pinned to an old Stainless output? Your generated code keeps working. What you lost is regeneration, which is the part that matters every time your API changes.
Key Takeaways
- Cloudflare open-sourced Forge under Apache 2.0 on September 28; it already generates the output for the new agent-facing cf CLI across a 3,500-plus-operation API.
- It is the second major Stainless customer, after Google with Speakeasy on September 17, to publish an open generator since Anthropic bought Stainless and closed its hosted product to new SDKs on May 18.
- Forge's real contribution is the CI pipeline: JSONPath overlays, a plugin lifecycle, and lint plus installable preview builds on every API change.
- Non-TypeScript SDKs in the repo are generated through Fern's Apache 2.0 generators in Docker, and those wrappers are still private.
- Nothing is on npm yet; plan to build from source if you want to try it this week.
Sources: Cloudflare Blog: Introducing Forge, cloudflare/forge on GitHub, Cloudflare Blog: Introducing cf, Anthropic: Anthropic acquires Stainless, Stainless: Stainless is joining Anthropic, Google Developers Blog: Why client SDK generation belongs in the open, speakeasy-api/openapi-generation, cloudflare/cloudflare-typescript, The New Stack: Anthropic Stainless deal, The New Stack