I’ll have to take a look at CUE; it might be worth using.
But I have to ask: isn’t there something simpler which can handle taking a declarative specification and adding imperative behaviour to it? I’m writing — as anyone who knows me might suspect — of S-expressions & Lisp.
They have an advantage over CUE in that one might well choose to write one’s entire program in Lisp & S-expressions. It doesn’t look like CUE is intended to be the whole-program language.
I remember that Tcl used to be commonly used for config-files-which-need-a-bit-of-scripting, but while it is an awesome language (really!) one probably doesn’t want to write an entire program with it, but rather use it to stitch functions written in C together.
Jsonnet (and so CUE) has a lot of overlap with LISP.
I find it's syntax more suited to constructing data structures than I do LISP if only because "{}" and "[]" are more concise ways to indicate "object" and "array" than using an S-expression.