@gooddata/code-cli
Advanced tools
Comparing version 0.5.0 to 0.6.0
@@ -8,3 +8,3 @@ { | ||
], | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"author": "GoodData", | ||
@@ -11,0 +11,0 @@ "license": "SEE LICENSE IN LICENSE", |
@@ -6,75 +6,43 @@ <p align="center"> | ||
> GoodData for VS Code and GoodData CLI are available for you to try out and provide feedback. Avoid using them in a production environment. | ||
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. | ||
Manage your analytics as code. The solution consists of two components: | ||
> GoodData CLI is available for you to try out and provide feedback. As it is still in beta, avoid using it in production. | ||
* [GoodData Visual Studio Code Extension](https://marketplace.visualstudio.com/items?itemName=GoodData.gooddata-vscode). | ||
* [GoodData Command-line Interface](https://www.npmjs.com/package/@gooddata/code-cli). | ||
## Getting Started | ||
Together these tools allow you to: | ||
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/). | ||
1. Retrieve analytical objects from a GoodData server. | ||
1. Create or update analytical objects in Visual Studio Code. | ||
1. Preview analytical objects in Visual Studio Code. | ||
1. Deploy analytical objects to a workspace. | ||
## Installation | ||
The analytical objects you can work with include datasets, which form the logical data model, and metrics. Additionally, we have plans to incorporate support for visualizations in the near future. | ||
To install, simply run `npm i -g @gooddata/code-cli` in your terminal. | ||
With GoodData CLI you can: | ||
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`. | ||
* Initialize a new local environment. | ||
* Clone an existing workspace. | ||
* Validate local analytical objects. | ||
* Deploy your analytical objects to a workspace. | ||
> 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. | ||
## Prerequisites | ||
## Options | ||
Before getting started, ensure that you have: | ||
| Option | Description | | ||
|---------------------|--------------------------------| | ||
| `-h` or `--help` | Display the usage information. | | ||
| `-v` or `--version` | Show GoodData CLI version. | | ||
* GoodData [workspace](https://www.gooddata.com/developers/cloud-native/doc/cloud/create-workspaces/concepts/workspace/). | ||
* [API access token](https://www.gooddata.com/developers/cloud-native/doc/cloud/manage-organization/user-token/). | ||
* [Node.js version 16.17 or newer installed](https://nodejs.org/). | ||
## Commands | ||
## Install CLI | ||
| 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. | | ||
In terminal, run `npm i -g @gooddata/code-cli`. | ||
You should have a new CLI command available, try running `gd -v` or `gd --help`. | ||
## `gd init` command | ||
Once the CLI is installed you are able to initialize your local environment. | ||
**Steps:** | ||
1. Open a terminal and navigate to a folder where you want to build and store your analytics. | ||
1. To initialize your local environment, run `gd init` and follow the instructions to create a `gooddata.yaml` configuration file. | ||
> The gd_init step also creates `.env` and `.gitignore` files, in case you wish to store the analytics in a Version Control System (like Git) | ||
## `gd clone` command | ||
To clone existing workspace to your local environment, run `gd clone`. | ||
You should now have an `analytics` folder that contains your analytical objects. | ||
## `gd validate` command | ||
GoodData CLI validate your local environment. This is useful if you want to set up CI/CD pipelines | ||
and, for example, ensure the workspace is valid before merging a pull request. | ||
GoodData CLI validates: | ||
* syntax of the YAML files is correct. | ||
* properties (e.g. there can' be any missing or invalid). | ||
* references between analytical objects. | ||
* references to the database tables and columns. | ||
To execute validation, run `gd validate`. | ||
## `gd deploy` command | ||
GoodData CLI can deploy your local environment to a workspace defined in `gooddata.yaml` file. | ||
To execute the deployment, run `gd deploy`. | ||
Before deploying, GoodData CLI will also run validation, unless `--no-validate` argument was passed to the command. | ||
[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 |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8468777
48