Skip to content

Commit ae7fcf5

Browse files
committed
cp dines
1 parent 026ff63 commit ae7fcf5

2 files changed

Lines changed: 20 additions & 3 deletions

File tree

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,15 @@ npm link
3232

3333
## Setup
3434

35-
First, configure your API key:
35+
Configure your API key using either method:
36+
37+
### Option 1: Environment Variable (Recommended for CI/CD)
38+
39+
```bash
40+
export RUNLOOP_API_KEY=your_api_key_here
41+
```
42+
43+
### Option 2: Interactive Setup
3644

3745
```bash
3846
rln auth
@@ -45,9 +53,15 @@ Get your API key from [https://runloop.ai/settings](https://runloop.ai/settings)
4553
### Authentication
4654

4755
```bash
48-
rln auth # Configure API key
56+
# Interactive setup (stores API key locally)
57+
rln auth
58+
59+
# Or use environment variable
60+
export RUNLOOP_API_KEY=your_api_key_here
4961
```
5062

63+
The CLI will automatically use `RUNLOOP_API_KEY` if set, otherwise it will use the stored configuration.
64+
5165
### Devbox Commands
5266

5367
```bash

src/utils/config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ const config = new Conf<Config>({
99
});
1010

1111
export function getConfig(): Config {
12+
// Check environment variable first, then fall back to stored config
13+
const apiKey = process.env.RUNLOOP_API_KEY || config.get('apiKey');
14+
1215
return {
13-
apiKey: config.get('apiKey'),
16+
apiKey,
1417
};
1518
}
1619

0 commit comments

Comments
 (0)