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 workstation with the GoodData server.
This is done using the following commands:
cloneEnables you to download the server metadata and save them to your local workstation. -deployEnables you to replace the target workspace based on your local files.
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 | Shows a list of commands and options you can use with GoodData CLI. As we are in alpha, only some options are currently available. |
-l or --log-level <level> | Log verbosity (choices: “error”, “warn”, “info”, “debug”, default: “info”) |
-v or --version | Returns the version you have installed on your computer. |
Commands
| Command | Description |
|---|---|
| clone | Downloads metadata from the server and saves them as files to a local folder. It uses information from the configuration file for logging into the server. |
| init | Starts an interactive guide to help you set up your project by creating the gooddata.yaml configuration file. |
| deploy | Deploys all local definitions to the workspace defined in the profile. The operation replaces objects in the target workspace. |
| validate | Validates given files for syntactic errors. |
| help | Displays help |
clone
Downloads metadata from the server and saves them as files to a local folder. It uses information from the configuration file for logging into the server.
Example of use:
gd clone -foptions
| 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 | Displays help |
init
Starts an interactive guide to help you set up your project by creating the gooddata.yaml configuration file.
Example of use:
gd initoptions
| Option | Description |
|---|---|
-l,--log-level <level> | Log verbosity (choices: “error”, “warn”, “info”, “debug”, default: “info”) |
-h, --help | Displays help |
deploy
Deploys all local definitions to the workspace defined in the profile. The operation replaces objects in the target workspace.
Example of use:
gd deploy --profile productionoptions
| 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 help |
validate
Validates given files for syntactic errors.
Example of use:
gd validateoptions
| Option | Description |
|---|---|
-l,--log-level <level> | Log verbosity (choices: “error”, “warn”, “info”, “debug”, default: “info”) |
-p or --profile <profileName> | Profile to use |
-h, --help | Displays help |
help
Displays a list of available commands.
Exemplary use:
gd help initoptions
No options; use one of the listed commands.