CUE has first-class support for a growing range of formats and ecosystems:
JSON
CUE reads, writes, and validates JSON data, regardless of its source:
discrete JSON files, I/O streams, or JSON contained in data fields inside
other formats. The
cue
command emits JSON by default.Learn more
Learn moreYAML
CUE’s support for YAML mirrors its first class JSON support: it reads, writes
and validates YAML data anywhere it can be found: discrete YAML files, I/O
streams, or YAML contained in data fields inside other formats.
Read more
Read moreGo
The
cue
command converts Go types to CUE, enabling their first class use as
schema and data constraints. CUE’s extensive Go API allows code to have
fine grained control over CUE’s capabilities and operations, including
export to any encoding supported by CUE.Learn more
Learn moreOpenAPI
CUE reads and writes OpenAPI data schemas through its Go API and the
cue
command, enabling schemas to be used to constrain and validate data directly,
and to be expressed in other formats - including CUE.Read more
Read moreProtocol Buffers
CUE’s Go API and the
cue
command read Protobuf definitions, enabling them
to be used to constrain and validate data directly and to be expressed in other
formats. CUE constraints can be extracted from Protobuf options, allowing
richer data validation than Protobuf’s type-based defaults.Learn more
Learn moreJSON Schema
CUE understands JSON Schema constraints through its Go API and the
cue
command, enabling schemas to be used to constrain and validate data directly,
and to be expressed in other formats - including CUE.Read more
Read moreJava
Technology preview
Support for using CUE in Java is available through an experimental Java library.
Follow this introductory tutorial to get started with CUE in Java.
Learn more
Learn moreTechnologies
CUE is independent of the technologies it can be used alongside.
Some examples of its use with specific tools, systems, and providers are collected in
CUE By Example:
Controlling Kubernetes
A worked example of converting a set of Kubernetes configuration files
for a collection of microservices into smaller, validated CUE configurations by
automatically removing boilerplate;
automating commands that don’t know CUE yet (such as
kubectl
);
and extracting schema definitions from Kubernetes source code.Read on CUE By Example
Read on CUE By ExampleDriving GitHub Actions workflows
A guide explaining how to convert GitHub Actions workflow files from YAML to
CUE, check those workflows are valid, and then use CUE’s tooling layer to
regenerate YAML - allowing safer and more predictable changes.
Read on CUE By Example
Read on CUE By ExampleWriting Terraform plan policies
A pair of guides showing how to validate the JSON output from
terraform plan
using CUE as a policy language.Read on CUE By Example
Read on CUE By ExampleManaging Mythic Beasts DNS
A guide that demonstrates how to use CUE to keep DNS data in a compact format,
using CUE templating to DRY out configurations, and use CUE’s constraints to
enforce policies on the data to guard against mistakes.
Read on CUE By Example
Read on CUE By ExampleDriving GitLab CI/CD Pipelines
A guide illustrating how to convert a GitLab CI/CD pipeline file from YAML to
CUE, check its contents are valid, and then use CUE’s tooling layer to
regenerate YAML - allowing safer and more predictable changes.
Read on CUE By Example
Read on CUE By ExampleDriving Buildkite pipelines
A guide demonstrating how to convert static Buildkite pipelines files from YAML to
CUE, check the pipelines are valid, and then use CUE’s tooling layer to
regenerate YAML - allowing safer and more predictable changes by switching to CUE as a source of truth.
Read on CUE By Example
Read on CUE By ExampleSupercharging Buildkite pipelines
A guide that builds on an official Buildkite blog post, showing how to use CUE
to define and validate CI pipelines as they’re initiated and as they’re
executing, so that their steps can vary dynamically, based on the pipeline’s
execution context.
Read on CUE By Example
Read on CUE By Example