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:

  • 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.

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

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.