- 08 Nov 2024
- 5 Minutes to read
- Print
- DarkLight
project commands
- Updated on 08 Nov 2024
- 5 Minutes to read
- Print
- DarkLight
Use project
commands to create projects, retrieve and deploy metadata artifacts, and create artifact retrieval manifests and artifact deployment scripts.
Commands
Command | Description |
---|---|
project:create | Creates a project. |
project:manifest:create | Creates a manifest that lists metadata artifacts in a ZOrg. |
project:retrieve:start | Retrieves metadata artifacts. |
project:deploy:script:generate | Creates a script that lists metadata artifacts to deploy. |
project:deploy:start | Deploys metadata artifacts. |
- Run the
zdx commands
command to list all supported commands. - All Zilliant CLI commands support the
--help
parameter. Run a command with this parameter for a description and list of supported parameters.
zdx project:create
Creates a project on your computer. The project is created in the directory where you run the command.
You can't create projects in protected folders. Make sure to run the zdx project:create
command from a directory without controlled access.
Parameters
-n
|--name
(Required.) Name of the project.
Creates a project directory with this name. Naming conventions of your operating system apply.-c
|--datacenter
(Optional.) Name of the datacenter that hosts your ZOrg. Contact your Zilliant representative to get the datacenter name. Supported values:- na2
- eu1
- snail
- escargot
The new project directory on your computer contains sample retriever.json and deployer.yaml files. If you create the retrieval manifest and deployment script manually, use these files as examples.
Example
PS C:\Users\username> zdx project:create -n NewProject -c na2
Project created successfully!
zdx project:manifest:create
Creates a manifest that lists all metadata artifacts in a ZOrg.
Parameters
-c
|--datacenter
(Optional.) Name of the datacenter that hosts a ZOrg for which you want to create a manifest. The default value is the project's datacenter.-d
|--output-dir
(Optional.) Path to the directory where you want to store the manifest. The default value is the root directory of the current project.-n
|--name
(Optional.) Name of the manifest. The default value is manifest.json.-p
|--source-dir
(Optional.) Path to the project folder that contains metadata artifacts based on which you want to create a manifest. The default value is /zilliant-app/default.-z
|--from-zorg
(Optional.) ID of the ZOrg for which you want to create a manifest.
You can't use the -p
parameter and the -z
parameter at the same time. Enter a value for only one of them.
zdx project:retrieve:start
Retrieves metadata artifacts from a ZOrg into a project on your computer.
- Run this command from the project directory.
- Use Zilliant CLI to retrieve up to 10,000 rows of entity data. For larger entities, use data migration tools such as Zilliant's Entity Import service or Entity Export service .
Parameters
-c
|--datacenter
(Optional.) Name of the datacenter that hosts a ZOrg from which you want to retrieve metadata artifacts. The default value is the project's datacenter.-d
|--source-dir
(Optional.) Path to the directory into which you want to retrieve the metadata artifacts. The default value is /zilliant-app/default.-m
|--manifest
(Required.) Path to the manifest (typically named manifest.json) that lists the metadata artifacts to retrieve. If the manifest file is located in the directory where you run the command, enter only the manifest name.-v
|--validation-mode
(Optional.) Validation mode for retrieving metadata artifacts from the ZOrg. Supported values:- ignore—Retrieve all metadata artifacts without verifying whether their dependencies are missing in the manifest.
- validate—(Default.) Verify whether any dependencies are missing in the manifest. If dependencies are missing, retrieval fails and the command returns a list of missing artifacts.
- validateAndResolve—Verify whether any artifact dependencies are missing in the manifest. If dependencies are missing, retrieve them automatically together with all artifacts listed in the manifest.
-z
|--from-zorg
(Required.) ID of the ZOrg from which you want to retrieve the metadata artifacts.
Example
PS C:\Users\username\ProjectName> zdx project:retrieve:start -m manifest.json -v validate -z ZOrgID
zdx project:deploy:script:generate
Creates a script listing the metadata artifacts that you want to deploy. The script is generated based on one or two manifests.
Parameters
-d
|--output-dir
(Optional.) Path to the directory where you want to store the script. The default value is your project's root directory.-n
|--name
(Optional.) Name of the script. The default value is deploy.yaml.-s
|--start-manifest
(Optional.) Path to the manifest that lists all metadata artifacts currently located in the ZOrg into which you want to deploy metadata. By default, the value is empty.-t
|--target-manifest
(Optional.) Path to the manifest that lists all metadata artifacts you want to be in the ZOrg after deployment is complete. By default, the value is empty.
You can't leave both parameters -s
and -t
empty. Enter a value for at least one of them.
zdx project:deploy:start
Deploys metadata artifacts from a project on your computer into a target ZOrg.
Run this command from the project directory.
Parameters
-c
|--datacenter
(Optional.) Name of the datacenter that hosts the ZOrg into which you want to deploy metadata artifacts. The default value is the project's datacenter.-d
|--source-dir
(Optional.) Name of the directory that contains metadata artifacts to deploy. The default value is zilliant-app/default.-s
|--deploy-script
(Required.) Path to the script (typically named deploy.yaml) that lists metadata artifacts to deploy. If your script is located in the directory where you run the command, enter only the script name.-z
|--target-zorg
(Required.) ID of the ZOrg into which you want to deploy the metadata artifacts.