GoodData Command-line Interface
The GoodData Command-line Interface (CLI) lets you easily sync your local environment with the server.
This is done using the following commands:
clone
Downloads analytical objects from the workspace and saves them to your local environment.deploy
Replaces the target workspace with your local analytical objects.
To install the CLI, run npm i -g @gooddata/code-cli
.
Generic Options
The following options are available for all commands:
Option | Description |
---|---|
-h or --help | Display the usage information. |
-v or --version | Show GoodData CLI version. |
-l <level> ,--log-level <level> | Log verbosity (choices: “error”, “warn”, “info”, “debug”, default: “info”) |
Commands
Command | Description |
---|---|
init | Initialize a local GoodData environment. |
clone | Clone analytical objects from the workspace. |
deploy | Deploy analytical objects to GoodData. |
validate | Validate local environment. |
help | Display the usage information. |
init
Initialize a local GoodData environment.
Creates gooddata.yaml
configuration file. Also creates .env
to store environmental variables and .gitignore
, so you can easily start storing your analytics in Version Control System (like git).
Example of use:
gd init
clone
Clone analytical objects from the workspace.
clone
uses information from the configuration file to connect to GoodData.
Example of use:
gd clone -f
options
Option | Description |
---|---|
-p <profileName> or --profile <profileName> | Profile to use |
-f or --force | Overwrites source_dir if it exists. All files in that folder will be erased. |
deploy
Deploys all local analytical objects to the workspace defined in the profile. The operation replaces objects in the target workspace.
Example of use:
gd deploy --profile production
options
Option | Description |
---|---|
-p or --profile <profileName> | Profile to use |
--no-validate | Skips validation before deployment |
validate
Validates analytical objects defined in .yaml files for syntactic and semantic errors.
Example of use:
gd validate
options
Option | Description |
---|---|
-p or --profile <profileName> | Profile to use |
help
Display the usage information for the CLI or for a specific command.
Example of use:
gd help
Or:
gd help clone