cog
A schema-driven code generator, built by Grafana, that reads CUE, JSON Schema or OpenAPI definitions and emits typed classes and builder libraries in Go, Java, PHP, Python or TypeScript.
cog generates both plain data types described by a schema and developer-friendly builder libraries for constructing complex objects as code, across several target languages from one schema source. It runs either as a standalone command-line binary driven by a YAML pipeline configuration, or as a Go library for embedding code generation into another tool.
Grafana uses cog internally to generate its own Foundation SDK from schemas it exposes, and to implement a schema-first approach where resources such as dashboards are defined as schemas first and code is generated from them for both frontend and backend; a related project, grafana-app-sdk, uses cog as a library for some of its own code-generation needs. Despite originating at Grafana, the tool itself is schema-agnostic and not tied to Grafana's own schemas.
It is written in Go, licensed under Apache-2.0, and is currently in public preview.