I have heard some people say the CUE website is intimidating. I think this is because too many concepts are introduced at once, and things are not introduced in the best order. The menu on the left contains many topics.
First you should read Getting Started | CUE and install CUE. After this I would go straight to the Introduction | CUE tutorial. Try to grok:
- Constraints | CUE
- Constraints are for validation and, well, constraining possible values.
- Constraints can reduce boilerplate.
- Foundations | Overview | Cuetorials
- Explains conjunctions.
- Definitions | CUE
- Introduces the conjunction operator
&
without having introduced it.
- Introduces the conjunction operator
- What is CUE? | Dagger is also interesting. They use the word embedding to describe how the conjunction operator works. CUE works by Composition over inheritance, which is a very good thing.
You need to understand what #
and _#
means. You also need to understand &
.
You can import any YAML or JSON file with cue import
. Wrap the data in a
object and try to add some schema definitions to it. Run cue export
or cue
eval
to see what you get.
Any data you add will be exported by CUE as one big blob of data. You can use
CUE’s scripting layer to export different parts of the data. You could also use
jq
if you so desire.
- Large-Scale Engineering of Configuration with Unification (Marcel van Lohuizen) - YouTube
- CUE: Configuration superpowers for everyone with Marcel van Lohuizen, Paul
Jolly, & Roger Peppe (Go Time #163) |> Changelog
- There is a transcript on this page.
- Hands-on Introduction to CUE | Rawkode Live - YouTube
- FOSDEM 2022 - A practical guide to CUE: patterns for everyday use - YouTube
- Pulumi YAML & CUE language with Paul Jolly | Modern Infrastructure - YouTube
- Using CUE with GitHub Actions - YouTube
- This video makes a lot more sense if you learn the syntax and concepts of CUE first. cue-examples/github-actions-example is the code for this tutorial.
- Cue Project on GerritHub and GitHub actions - YouTube
You can use GitHub Code Search (see docs and Searching on GitHub):
path:*.cue language:cue
path:.github/ language:cue