GoodData Command-line Interface
Beta Feature
GoodData CLI is still in the Beta stage. It is available for you to try out and possibly provide us feedback. Avoid using it in a production environment.
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
.
CLI shortcut
The CLI command is gd
. Some terminal frameworks, e.g. OMZ, have preset the gd
alias as a git diff
.
The CLI follows the standard notation: gd <options> <commands>
If you experience problems with the alias, try running unalias gd
and consider adding this line to your .zshrc
(or other) profile file.
Options
Option | Description |
---|---|
-h or --help | Display the usage information. |
-v or --version | Show GoodData CLI version. |
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. |
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 |
---|---|
-l ,--log-level <level> | Log verbosity (choices: “error”, “warn”, “info”, “debug”, default: “info”) |
-p or --profile <profileName> | Profile to use |
-f or --force | Overwrites source_dir if it exists. All files in that folder will be erased. |
-h , --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, if you’d like to store your analytics in Version Control System (like git).
Example of use:
gd init
options
Option | Description |
---|---|
-l ,--log-level <level> | Log verbosity (choices: “error”, “warn”, “info”, “debug”, default: “info”) |
-h , --help | Display the usage information. |
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 |
---|---|
-l ,--log-level <level> | Log verbosity (choices: “error”, “warn”, “info”, “debug”, default: “info”) |
-p or --profile <profileName> | Profile to use |
--no-validate | Skips validation before deployment |
-h , --help | Display the usage information. |
validate
Validates analytical objects defined in .yaml files for syntactic errors.
Example of use:
gd validate
options
Option | Description |
---|---|
-l ,--log-level <level> | Log verbosity (choices: “error”, “warn”, “info”, “debug”, default: “info”) |
-p or --profile <profileName> | Profile to use |
-h , --help | Display the usage information. |
help
Display the usage information.
Example of use:
gd help
options
No options; use one of the listed commands.