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:

OptionDescription
-h or --helpDisplay the usage information.
-v or --versionShow GoodData CLI version.
-l <level>,--log-level <level>Log verbosity (choices: “error”, “warn”, “info”, “debug”, default: “info”)

Commands

CommandDescription
initInitialize a local GoodData environment.
cloneClone analytical objects from the workspace.
deployDeploy analytical objects to GoodData.
validateValidate local environment.
helpDisplay 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

OptionDescription
-p <profileName> or --profile <profileName>Profile to use
-f or --forceOverwrites 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

OptionDescription
-p or --profile <profileName>Profile to use
--no-validateSkips validation before deployment

validate

Validates analytical objects defined in .yaml files for syntactic and semantic errors.

Example of use:

gd validate

options

OptionDescription
-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