CUE (Configure, Unify, Execute) is a data constraint language from Marcel van Lohuizen, who previously worked on Borgâs configuration language (BCL/GCL) at Google. Itâs a superset of JSON where types and values live in the same lattice: int is a constraint satisfied by all integers, >0 is a narrower constraint, 42 is the narrowest. Unification â CUEâs core operation â combines any two values into the most specific value that satisfies both, or fails with a clear conflict. This means schemas, defaults, and concrete data compose associatively and commutatively, and order of imports doesnât matter.
In practice, CUE is used for Kubernetes manifests (it round-trips to YAML and JSON, and can import OpenAPI, Protobuf, and JSON Schema), generating configuration across multiple systems from a single source of truth, validating data in CI, and as the base language for higher-level tools â Daggerâs pipelines originally used CUE, Istio uses it internally for CRD validation, and Timoni is a Helm-alternative built entirely on CUE modules. It has a package manager (cue mod), a central registry, and modules with SemVer.
Compared to Jsonnet, Dhall, or Helm templates, CUEâs win is that there is no separate templating language layered on top of your data: constraints, defaults, and values are all the same thing, and conflicts are statically detectable. The cost is a steep learning curve â unification, disjunctions, and the type lattice are unfamiliar to most engineers arriving from YAML and Go templates.