@gooddata/code-cli 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,77 +3,45 @@
3
3
  </p>
4
4
  <h1 align="center">GoodData CLI</h1>
5
5
 
6
- > GoodData for VS Code and GoodData CLI are available for you to try out and provide feedback. Avoid using them in a production environment.
6
+ 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.
7
7
 
8
- Manage your analytics as code. The solution consists of two components:
8
+ > GoodData CLI is available for you to try out and provide feedback. As it is still in beta, avoid using it in production.
9
9
 
10
- * [GoodData Visual Studio Code Extension](https://marketplace.visualstudio.com/items?itemName=GoodData.gooddata-vscode).
11
- * [GoodData Command-line Interface](https://www.npmjs.com/package/@gooddata/code-cli).
10
+ ## Getting Started
12
11
 
13
- Together these tools allow you to:
12
+ 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/).
14
13
 
15
- 1. Retrieve analytical objects from a GoodData server.
16
- 1. Create or update analytical objects in Visual Studio Code.
17
- 1. Preview analytical objects in Visual Studio Code.
18
- 1. Deploy analytical objects to a workspace.
14
+ ## Installation
19
15
 
20
- 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.
16
+ To install, simply run `npm i -g @gooddata/code-cli` in your terminal.
21
17
 
22
- With GoodData CLI you can:
18
+ 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`.
23
19
 
24
- * Initialize a new local environment.
25
- * Clone an existing workspace.
26
- * Validate local analytical objects.
27
- * Deploy your analytical objects to a workspace.
20
+ > There is a known overlap with [OMZ](https://ohmyz.sh/) default aliases.
21
+ > Instead of `gd` version (`0.5.0`), you might see:
22
+ > `error: unknown switch ‘v’`
23
+ > `usage: git diff --no-index [<options>] <path> <path>`
24
+ > 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.
28
25
 
29
- ## Prerequisites
26
+ ## Options
30
27
 
31
- Before getting started, ensure that you have:
28
+ | Option | Description |
29
+ |---------------------|--------------------------------|
30
+ | `-h` or `--help` | Display the usage information. |
31
+ | `-v` or `--version` | Show GoodData CLI version. |
32
32
 
33
- * GoodData [workspace](https://www.gooddata.com/developers/cloud-native/doc/cloud/create-workspaces/concepts/workspace/).
34
- * [API access token](https://www.gooddata.com/developers/cloud-native/doc/cloud/manage-organization/user-token/).
35
- * [Node.js version 16.17 or newer installed](https://nodejs.org/).
33
+ ## Commands
36
34
 
37
- ## Install CLI
35
+ | Command | Description |
36
+ |------------|----------------------------------------------|
37
+ | [init] | Initialize a local GoodData environment. |
38
+ | [clone] | Clone analytical objects from the workspace. |
39
+ | [deploy] | Deploy analytical objects to GoodData. |
40
+ | [validate] | Validate local environment. |
41
+ | [help] | Display the usage information. |
38
42
 
39
- In terminal, run `npm i -g @gooddata/code-cli`.
40
- You should have a new CLI command available, try running `gd -v` or `gd --help`.
41
-
42
- ## `gd init` command
43
-
44
- Once the CLI is installed you are able to initialize your local environment.
45
-
46
- **Steps:**
47
-
48
- 1. Open a terminal and navigate to a folder where you want to build and store your analytics.
49
- 1. To initialize your local environment, run `gd init` and follow the instructions to create a `gooddata.yaml` configuration file.
50
-
51
- > 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)
52
-
53
-
54
- ## `gd clone` command
55
-
56
- To clone existing workspace to your local environment, run `gd clone`.
57
-
58
- You should now have an `analytics` folder that contains your analytical objects.
59
-
60
- ## `gd validate` command
61
-
62
- GoodData CLI validate your local environment. This is useful if you want to set up CI/CD pipelines
63
- and, for example, ensure the workspace is valid before merging a pull request.
64
-
65
- GoodData CLI validates:
66
- * syntax of the YAML files is correct.
67
- * properties (e.g. there can' be any missing or invalid).
68
- * references between analytical objects.
69
- * references to the database tables and columns.
70
-
71
- To execute validation, run `gd validate`.
72
-
73
- ## `gd deploy` command
74
-
75
- GoodData CLI can deploy your local environment to a workspace defined in `gooddata.yaml` file.
76
-
77
- To execute the deployment, run `gd deploy`.
78
-
79
- Before deploying, GoodData CLI will also run validation, unless `--no-validate` argument was passed to the command.
43
+ [init]: https://www.gooddata.com/docs/cloud/api-and-sdk/vs-code-extension/cli/#init
44
+ [clone]: https://www.gooddata.com/docs/cloud/api-and-sdk/vs-code-extension/cli/#clone
45
+ [deploy]: https://www.gooddata.com/docs/cloud/api-and-sdk/vs-code-extension/cli/#deploy
46
+ [validate]: https://www.gooddata.com/docs/cloud/api-and-sdk/vs-code-extension/cli/#validate
47
+ [help]: https://www.gooddata.com/docs/cloud/api-and-sdk/vs-code-extension/cli/#help