Introducing Forge: the open source pipeline for generating SDKs, CLIs, docs, and more
Cloudflare has open-sourced Forge, a flexible, pluggable pipeline for generating SDKs, CLIs, documentation, and other outputs directly from API specifications, aiming to reduce coordination overhead and enable agent-first development workflows.
Cloudflare introduced Forge, an open source generation pipeline designed to produce SDKs, CLIs, documentation, and libraries from API specifications. The tool is designed to run in CI pipelines, allowing teams to preview changes before merging them, similar to Workers Previews. Forge currently generates outputs for the cf CLI and will expand to cover API documentation, SDKs, and additional targets over the coming months. The project is positioned as a solution to the challenges of coordinating changes across hundreds of services and repositories while maintaining consistency in generated outputs.
Forge addresses the limitations of existing hosted generation tools by enabling teams to preview the impact of API changes on SDKs, CLIs, and documentation before they are merged. The pipeline lints changes and generates preview builds that highlight modifications, allowing engineers to test the effects of their updates locally. This approach aims to eliminate last-minute breakages and reduce the overhead of coordinating changes across multiple teams and vendors. Cloudflare’s API, spanning over 3,500 operations, requires a scalable and flexible generation system to support its distributed services.
The tool supports OpenAPI as an input format today but is designed to accommodate AsyncAPI, GraphQL, Cap’n Proto, Protobuf, and other formats in the future. Forge allows users to chain outputs, such as generating a CLI from a TypeScript SDK or producing Terraform bindings from an SDK. This flexibility enables teams to tailor outputs to their specific needs, including local-only CLI behaviors that are not directly tied to API calls. Forge also aims to simplify API versioning, allowing for the release of new major versions without disrupting existing clients or SDKs.
Cloudflare plans to expand Forge’s capabilities to include TypeScript, Rust, Python, Go, PHP, and Terraform SDKs, with special attention to Terraform provider upgrades. The company emphasizes that Forge is built to ensure users retain ownership of their SDKs, CLIs, and documentation without relying on proprietary SaaS tools. By open-sourcing the pipeline, Cloudflare seeks to provide a free, flexible alternative for generating and maintaining API-related outputs across diverse languages and formats.