<p align="center">
  <img src="https://raw.githubusercontent.com/gooddata/gooddata-ui-sdk/master/assets/gooddata-logo.svg" alt="GoodData Logo" width="120px" height="120px"/>
</p>
<h1 align="center">GoodData CLI</h1>

The GoodData Command-line Interface (CLI) lets you easily sync your local environment with the server. It is mainly aimed at the usage in CI/CD pipelines.

> GoodData CLI is available for you to try out and provide feedback. As it is still in beta, avoid using it in production.

## Getting Started

This README offers a brief overview of the CLI tool without a detailed Getting Started guide. For a comprehensive introduction and walkthrough, please visit[Get Started with GoodData for VS Code](https://www.gooddata.com/developers/cloud-native/doc/cloud/api-and-sdk/vs-code-extension/getting-started/).

## Installation

To install, simply run `npm i -g @gooddata/code-cli` in your terminal.

Now you should have a new CLI command available, try running `gd -v` and you should get something along the lines of `0.5.0`.

> There is a known overlap with [OMZ](https://ohmyz.sh/) default aliases.
> Instead of `gd` version (`0.5.0`), you might see:
> `error: unknown switch ‘v’`
> `usage: git diff --no-index [<options>] <path> <path>`
> If you do, try to run `unalias gd` and try to run `gd -v` again. If you play using GoodData CLI, consider adding this line to your .zshrc (or another) profile file, as otherwise it will not persist between sessions.

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

[init]: https://www.gooddata.com/docs/cloud/api-and-sdk/vs-code-extension/cli/#init
[clone]: https://www.gooddata.com/docs/cloud/api-and-sdk/vs-code-extension/cli/#clone
[deploy]: https://www.gooddata.com/docs/cloud/api-and-sdk/vs-code-extension/cli/#deploy
[validate]: https://www.gooddata.com/docs/cloud/api-and-sdk/vs-code-extension/cli/#validate
[help]: https://www.gooddata.com/docs/cloud/api-and-sdk/vs-code-extension/cli/#help
