@lightdash-tools/cli 0.1.0 → 0.1.1
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 +47 -28
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -4,26 +4,27 @@ Command-line interface for interacting with the Lightdash API.
|
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
You can run the CLI directly without installation using `npx`:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
|
|
10
|
+
npx @lightdash-tools/cli --help
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Or install it globally:
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
|
|
16
|
+
npm install -g @lightdash-tools/cli
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Usage
|
|
20
20
|
|
|
21
21
|
### Environment Variables
|
|
22
22
|
|
|
23
|
-
The CLI requires the following environment variables:
|
|
23
|
+
The CLI requires the following environment variables (consistent with `@lightdash-tools/client`):
|
|
24
24
|
|
|
25
25
|
- `LIGHTDASH_URL` - Lightdash server base URL (e.g., `https://app.lightdash.cloud`)
|
|
26
|
-
- `LIGHTDASH_API_KEY` - Personal access token (
|
|
26
|
+
- `LIGHTDASH_API_KEY` - Personal access token (PAT)
|
|
27
|
+
- `LIGHTDASH_PROXY_AUTHORIZATION` - Optional proxy authorization header
|
|
27
28
|
|
|
28
29
|
Example:
|
|
29
30
|
|
|
@@ -34,9 +35,9 @@ export LIGHTDASH_API_KEY=your-token-here
|
|
|
34
35
|
|
|
35
36
|
### Commands
|
|
36
37
|
|
|
37
|
-
|
|
38
|
+
The CLI provides subcommands grouped by domain. All commands output JSON by default. If you are using `npx`, replace `lightdash-tools` with `npx @lightdash-tools/cli`.
|
|
38
39
|
|
|
39
|
-
|
|
40
|
+
#### Organization
|
|
40
41
|
|
|
41
42
|
```bash
|
|
42
43
|
lightdash-tools organization get
|
|
@@ -44,21 +45,40 @@ lightdash-tools organization get
|
|
|
44
45
|
|
|
45
46
|
#### Projects
|
|
46
47
|
|
|
47
|
-
Get a project by UUID:
|
|
48
|
-
|
|
49
48
|
```bash
|
|
49
|
+
lightdash-tools projects list
|
|
50
50
|
lightdash-tools projects get <projectUuid>
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
#### Explores
|
|
54
54
|
|
|
55
55
|
```bash
|
|
56
|
-
lightdash-tools
|
|
56
|
+
lightdash-tools explores list <projectUuid>
|
|
57
|
+
lightdash-tools explores get <projectUuid> <exploreId>
|
|
57
58
|
```
|
|
58
59
|
|
|
59
|
-
####
|
|
60
|
+
#### Charts
|
|
60
61
|
|
|
61
|
-
|
|
62
|
+
```bash
|
|
63
|
+
lightdash-tools charts list <projectUuid>
|
|
64
|
+
lightdash-tools charts get-code <projectUuid> --ids <slugs...>
|
|
65
|
+
lightdash-tools charts upsert-code <projectUuid> <slug> --file <chart.json>
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
#### Dashboards
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
lightdash-tools dashboards list <projectUuid>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
#### Spaces
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
lightdash-tools spaces list <projectUuid>
|
|
78
|
+
lightdash-tools spaces get <projectUuid> <spaceUuid>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
#### Groups
|
|
62
82
|
|
|
63
83
|
```bash
|
|
64
84
|
lightdash-tools groups list
|
|
@@ -66,20 +86,24 @@ lightdash-tools groups list
|
|
|
66
86
|
|
|
67
87
|
#### Users
|
|
68
88
|
|
|
69
|
-
List all users in the organization:
|
|
70
|
-
|
|
71
89
|
```bash
|
|
72
90
|
lightdash-tools users list
|
|
73
91
|
```
|
|
74
92
|
|
|
93
|
+
#### Query
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
lightdash-tools query compile <projectUuid> <exploreId> --file <query.json>
|
|
97
|
+
```
|
|
98
|
+
|
|
75
99
|
### Help
|
|
76
100
|
|
|
77
101
|
Get help for any command:
|
|
78
102
|
|
|
79
103
|
```bash
|
|
80
104
|
lightdash-tools --help
|
|
81
|
-
lightdash-tools organization --help
|
|
82
105
|
lightdash-tools projects --help
|
|
106
|
+
lightdash-tools charts --help
|
|
83
107
|
```
|
|
84
108
|
|
|
85
109
|
## Output Format
|
|
@@ -96,18 +120,13 @@ The CLI provides helpful error messages for:
|
|
|
96
120
|
|
|
97
121
|
## Development
|
|
98
122
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
pnpm test
|
|
103
|
-
```
|
|
123
|
+
If you are developing the CLI itself:
|
|
104
124
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
```
|
|
125
|
+
1. Install dependencies: `pnpm install`
|
|
126
|
+
2. Build: `pnpm build`
|
|
127
|
+
3. Run tests: `pnpm test`
|
|
128
|
+
4. Run locally: `node dist/index.jst`
|
|
110
129
|
|
|
111
130
|
## License
|
|
112
131
|
|
|
113
|
-
|
|
132
|
+
Apache-2.0
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lightdash-tools/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "CLI for Lightdash AI.",
|
|
5
5
|
"keywords": [],
|
|
6
|
-
"license": "
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
7
|
"author": "",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"types": "dist/index.d.ts",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"commander": "^14.0.3",
|
|
15
|
-
"@lightdash-tools/client": "0.1.
|
|
16
|
-
"@lightdash-tools/common": "0.1.
|
|
15
|
+
"@lightdash-tools/client": "0.1.1",
|
|
16
|
+
"@lightdash-tools/common": "0.1.1"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
19
|
"@types/node": "^25.2.3"
|