cue mod mirror

CUE v0.18.0

mirror module content between registries

Usage

cue mod mirror [module...] [flags]

This commmand ensures that a set of modules and their dependencies are available ("mirrored") in a registry.

For each module specified on the command line, it ensures that the module and all the modules it depends on are present in both the "from" registry and the "to" registry, and that the contents are the same in each. If --no-deps is specified then the module will be mirrored without its dependencies.

A module may be specified as <module>@<version>, in which case the specified version will be mirrored. If the version is canonical (for example v1.2.3), then exactly that version will be mirrored, otherwise (for example v1) the latest corresponding version will be mirrored (or all corresponding versions if --all-versions is specified).

For example:

	# Copy from $CUE_REGISTRY (usually the Central Registry) to my.registry.example
	cue mod mirror --to my.registry.example foo.com/m1@v1.2.3 bar.org@v2

will copy the exact module foo.com/m1@v1.2.3 but the latest version of bar.org@2, or all v2.x.y versions if --all-versions is given. If no major version is specified, the latest major version will be chosen.

By default the latest version is chosen by consulting the source registry, unless the --mod flag is specified, in which case the current module's dependencies will be used. When --mod is given and no modules are specified on the command line, all the current module's dependencies will be mirrored.

Flags

-a, --all-versions                 copy all available versions of the specified modules
-n, --dry-run                      only run simulation
--from string                      source registry (defaults to $CUE_REGISTRY)
-m, --mod                          mirror the current main module's dependency modules by default
--no-deps                          do not copy module dependencies
--to string                        destination registry (defaults to $CUE_REGISTRY)

Global flags

-E, --all-errors                   print all available errors
-C, --chdir string                 change working directory before running command (must be the first flag)
-i, --ignore                       proceed in the presence of errors
-s, --simplify                     simplify output
Install CUE