GoodData Command-line Interface

The GoodData Command-line Interface (CLI) lets you easily sync your local workstation with the GoodData server.

This is done using the following commands:

  • clone Enables you to download the server metadata and save them to your local workstation. -deploy Enables you to replace the target workspace based on your local files.

To install the CLI, run npm i -g @gooddata/code-cli.

Options

OptionDescription
-h or --helpShows 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 --versionReturns the version you have installed on your computer.

Commands

CommandDescription
cloneDownloads 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.
initStarts an interactive guide to help you set up your project by creating the gooddata.yaml configuration file.
deployDeploys all local definitions to the workspace defined in the profile. The operation replaces objects in the target workspace.
validateValidates given files for syntactic errors.
helpDisplays 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 -f

options

OptionDescription
-l,--log-level <level>Log verbosity (choices: “error”, “warn”, “info”, “debug”, default: “info”)
-p or --profile <profileName>Profile to use
-f or --forceOverwrites source_dir if it exists. All files in that folder will be erased.
-h, --helpDisplays help

init

Starts an interactive guide to help you set up your project by creating the gooddata.yaml configuration file.

Example of use:

gd init

options

OptionDescription
-l,--log-level <level>Log verbosity (choices: “error”, “warn”, “info”, “debug”, default: “info”)
-h, --helpDisplays 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 production

options

OptionDescription
-l,--log-level <level>Log verbosity (choices: “error”, “warn”, “info”, “debug”, default: “info”)
-p or --profile <profileName>Profile to use
--no-validateSkips validation before deployment
-h, --helpDisplay help

validate

Validates given files for syntactic errors.

Example of use:

gd validate

options

OptionDescription
-l,--log-level <level>Log verbosity (choices: “error”, “warn”, “info”, “debug”, default: “info”)
-p or --profile <profileName>Profile to use
-h, --helpDisplays help

help

Displays a list of available commands.

Exemplary use:

gd help init

options

No options; use one of the listed commands.