Programming and Software Development

Cloudflare Introduces Open-Source Forge for Generating SDK Packages, CLI Tools, and Documentation from API Definitions

Cloudflare announced Forge, an extensible, open-source pipeline that runs inside CI to generate SDK packages, CLI tools, and documentation directly from API definitions. The project enables preview versions for every change, links multiple outputs, and reduces the risk of incompatibilities between APIs and the tools that depend on them.

2026-09-28
4 min read
4 views
certi.news Editorial Team
Cloudflare Introduces Open-Source Forge for Generating SDK Packages, CLI Tools, and Documentation from API Definitions

Cloudflare announced Forge, an open-source and extensible pipeline for generating SDK packages, command-line tools, documentation, and libraries directly from API definitions. Forge runs inside continuous integration (CI) environments and can be run for free and self-hosted instead of relying on a hosted SaaS service.

The project responds to Cloudflare’s need to manage an API with more than 3,500 operations, supported by hundreds of services written in languages including Rust, Go, TypeScript, and Python. The company says Forge currently generates the outputs required for the cf CLI, with its use expected to extend over the coming months to Cloudflare’s documentation, SDK packages, and more.

Previews for Every Change

Forge runs inside product teams’ repositories, where it examines every change and then creates preview versions of the CLI tool, documentation, and SDK packages, highlighting the resulting modifications. Teams can install and test these versions before merging an API change or releasing it to customers.

This mechanism targets a practical problem in environments where an API is distributed across hundreds of services and repositories: a single change may break the generation process, and the affected team may not discover the problem until release. Running generation earlier inside CI moves validation closer to the source of the change and reduces the coordination required between teams.

Generating Interconnected Outputs

Forge is not limited to traditional language targets. The project can take an OpenAPI definition and generate outputs such as Cap’n Web, Cloudflare’s RPC system that enables remote TypeScript interfaces to be called in a way resembling local function calls. The company also points to the possibility of using the same approach to create TanStack Query bindings, Zod or Valibot schemas, and MCP servers.

Forge relies on composable adapters, allowing one output to be used to produce another output. It currently supports OpenAPI as an input type, with a design that allows AsyncAPI, GraphQL, Cap’n Proto, and Protobuf to be added in the future. Users can also define the generation chain instead of being forced into a fixed path, which is important when a CLI tool is built in a different language from an SDK package or when the tool contains manually written commands.

What Changes in Practice?

Forge introduces a model in which API consumption tools become part of the interface’s own development cycle rather than separate products updated later. This benefits teams that need to keep SDKs, documentation, and the CLI synchronized, but it does not eliminate the need to review generated outputs, particularly when the tool combines generated code with manually written commands or behaviors.

Cloudflare also links the project to its plans for managing API versions. After a decade of using major version v4, the company says it is working on an approach that would allow new major versions to be released without breaking customers or older SDK packages. The material did not announce details of this approach or a timeline for its implementation.

Open License and Current-Stage Limitations

Forge is available under the Apache 2.0 license and can be run, modified, and used internally or privately without fees. Cloudflare describes the project as still being at an early stage, despite using it to generate cf CLI outputs, and has promised to provide further details later about its TypeScript, Rust, Python, Go, PHP, and Terraform SDKs, with particular reference to migration requirements in the Terraform provider.

News source
Cloudflare Blog
Open original source ↗
c
Author

certi.news Editorial Team

In the same category

You may also like

View all news