Tags and the CLI
CUE can inject data from the command line into your configurations.
It uses the
# -t key=value -e to eval a specific value $ cue eval tags.cue -t database="foo" -e "#DB.conn" "postgres://postgres.dev:5432/foo"
We can combine data using multiple files
and change the results by selecting different files
Given the following files:
We can run
cue eval and switch environmental settings.
There are more advance patterns using cross directory packages and conditional imports. Visit the following links to see how.
- [cross directory packages]
- [conditional imports]