You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
where `{{ lightdash_domain }}` is the address for your running Lightdash instance. For example Lightdash cloud users in the US would type `lightdash login https://app.lightdash.cloud` if you're in Europe you'd type`lightdash login https://eu1.lightdash.cloud`.
18
13
19
-
This will open a new tab in your default browser. Log in to your Lightdash account (if you're not already logged in), then authorize the lightdash-cli client.
20
14
21
-
Once authorized, you’ll be logged in and ready to use the CLI.
15
+
```bash
16
+
lightdash login {{ lightdash_domain }}
17
+
```
22
18
23
-
<Frame>
24
-
<imgsrc="images/oauth-authorize.png"alt="" />
25
-
</Frame>
19
+
where `{{ lightdash_domain }}` is the subdomain for your Lightdash instance. For example, if you login at `https://petey.lightdash.cloud`, then you would type `lightdash login petey` to pop up a login window.
26
20
27
-
28
-
</Accordion>
29
-
30
-
<Accordiontitle="2. If you use your email + password in the browser, login with your email and password.">
31
-
To login to your Lightdash instance run the following command and provide your login email and password:
21
+
22
+
```bash
23
+
lightdash login petey
24
+
```
25
+
26
+
This opens your browser to authenticate. Once authorized, you're logged in and ready to use the CLI.
27
+
28
+
<Frame>
29
+
<imgsrc="/images/oauth-authorize.png"alt="" />
30
+
</Frame>
31
+
32
+
33
+
### Flexible URL formats
34
+
35
+
The CLI accepts your instance URL in multiple formats, all of these work:
36
+
37
+
```bash
38
+
# Just your subdomain (recommended for Lightdash Cloud)
For Lightdash Cloud users, you can simply use your subdomain (e.g., `petey` if your instance is at `petey.lightdash.cloud`).
52
+
53
+
For self-hosted instances, you can use the full domain without the `https://` prefix - it's assumed automatically.
54
+
55
+
56
+
### Re-authenticate to a previous instance
57
+
58
+
Once you've logged in, you can re-authenticate without specifying the URL:
59
+
60
+
```bash
61
+
lightdash login
62
+
```
63
+
64
+
This uses your previously saved instance URL.
65
+
66
+
<AccordionGroup>
67
+
<Accordiontitle="Login with email and password">
68
+
If you prefer to use email and password instead of browser-based OAuth:
32
69
33
70
```bash
34
-
lightdash login https://{{ lightdash_domain }}
71
+
lightdash login your_subdomain_here --no-oauth
35
72
```
36
73
37
-
where `{{ lightdash_domain }}` is the address for your running Lightdash instance. For example Lightdash cloud users in the US would type `lightdash login https://app.lightdash.cloud` if you're in Europe you'd type`lightdash login https://eu1.lightdash.cloud`.
74
+
You'll be prompted to enter your email and password.
38
75
</Accordion>
39
76
40
-
<Accordiontitle="3. If you use single sign-on (SSO) in the browser, login with a personal access token.">
41
-
First, you'll need to create a new personal access token in the UI by going to Settings > Personal Access Tokens. You can't use an existing personal access token! You have to create a new one just for yourself.
77
+
<Accordiontitle="Login with a personal access token (for SSO users)">
78
+
If you use single sign-on (SSO) in the browser, login with a personal access token.
42
79
43
-
{''}
80
+
First, create a new personal access token in the UI by going to Settings > Personal Access Tokens.
where `https://my-lightdash.domain.com` is the address for your running Lightdash instance. For example Lightdash cloud users in the US would type `lightdash login https://app.lightdash.cloud` if you're in Europe you'd type`lightdash login https://eu1.lightdash.cloud`.
56
91
</Accordion>
57
92
58
-
<Accordiontitle="4. If you're running in a CI/CD pipeline, login with environment variables">
93
+
<Accordiontitle="Login with environment variables (for CI/CD)">
59
94
You can use the following environment variables to authenticate yourself on each command:
60
95
61
96
***LIGHTDASH\_API\_KEY** a personal access token you can generate in the app under the user settings
@@ -67,10 +102,8 @@ Once authorized, you’ll be logged in and ready to use the CLI.
0 commit comments