Pull, push, compare and validate resources
Using the serialization commands you can pull, push, compare, and validate resources. You can then create and install a package.
In some of the examples in this section, the --name parameter has a value that includes a wildcard. Assigning wildcards to a parameter lets you target data based on a pattern instead of a literal value. For example, using the name value of MyNamespace* affects all resources with a name that starts with MyNamespace.
Pull
To fetch resources from the connected Content Hub ONE tenant, use the pull command. The working directory is initialized automatically when pulling resources for the first time.
You can specify what type of resource to fetch by appending parameters to the command, as shown in the following examples:
In some of the examples, the --id parameter has a value that includes a wildcard. Assigning wildcards to a parameter lets you target data based on a pattern instead of a literal value. For example, pulling content with an ID of B* pulls all items with an ID that begins with B.
Push
To push resources to the connected Content Hub ONE tenant, use the push command. You can specify what type of resource to push by appending parameters to the command, as shown in the following examples:
Compare
Use the Compare command to highlight the differences between local resources and those present in the tenant. By default, the output shows a high-level overview of whether an entity was updated ([U]), added ([A]) or deleted ([D]). To see detailed changes, you can append the --verbose flag to the command.
To compare resources, run one of the following commands:
Validate
The CLI validates the YAML files to ensure, for example, that they use unique IDs, valid culture identifiers, and respect field length restrictions.
To validate resources locally, even while working on them, run one of the following commands: