CUE's cli commands
This section provides a brief overview of CUE’s cli commands and their usage. We will be using many of these throughout and you will find links to the more in depth topics.
These are the most common commands used from the
Prints a consolidated representation of your code. Useful for seeing what the evaluator sees before running.
The eval command evaluates, validates, and prints a configuration. It can show the evaluated code and more with various flags.
Evaluates and emits configuration from the arguments. It is typically used to generate Yaml and JSON from CUE for other tools.
Validates data with schemas. Use -c to ensure concrete values, -d to select a schema, and file globs to process multiple files.
Import refers to bringing external resources into CUE.
cue importturns various data formats to CUE
cue get gogenerates CUE from Go types
See first-steps/import-configuration for more details.
cue mod only has
Eventually it will be something
that closely aligns with
cue cmd is how commands in the tooling layer are invoked.
You can run
cue cmd <name> or
cue <name> as long as
there is not a conflict with any official commands.
See first-steps/scripting for more details.
cue fmtfor standardized and consistent code
cue completionfor bash, zsh, fish, and powershell
cue fixfor syntax fixes and rewriting
cue trimreduces data redundancy base on schemas
While there is of course
cue help for all the commands,
you can find additional information with the
which span the cli.
Additional help topics: cue commands user-defined commands cue filetypes supported file types and qualifiers cue flags common flags for composing packages cue injection inject files or values into specific fields for a build cue inputs package list, patterns, and files
You can also supply the -h flag on any command to learn more.