Skip to content

Commit 7489c84

Browse files
authored
Explain ways for CLI auth (#76)
* Explain ways for CLI auth * Add access token variable * Switch option positions
1 parent 1bb5764 commit 7489c84

1 file changed

Lines changed: 26 additions & 4 deletions

File tree

docs/cli/auth.mdx

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,32 @@ title: "Authentication in CLI"
33
sidebarTitle: Authentication
44
---
55

6-
You must authenticate with E2B CLI before using it. Run the following command to sign in into your E2B account:
6+
There are two ways to authenticate with the E2B CLI:
77

8-
<CodeGroup>
9-
```bash Terminal
8+
## Option 1: Browser Authentication
9+
10+
<Warning>
11+
This option requires an interactive browser environment.
12+
</Warning>
13+
14+
Run the following command to sign in through your browser:
15+
16+
```bash
1017
e2b auth login
1118
```
12-
</CodeGroup>
19+
20+
This will open your default browser and prompt you to authenticate with your E2B account.
21+
22+
## Option 2: Setup Environment Variables
23+
24+
Set your environment variables:
25+
26+
```bash
27+
export E2B_API_KEY=your_api_key_here
28+
export E2B_ACCESS_TOKEN=your_acces_token_here
29+
```
30+
31+
<Info>
32+
Learn more about obtaining and managing your API key and access token on the [API Key page](/docs/api-key).
33+
</Info>
34+

0 commit comments

Comments
 (0)