Skip to content

Commit b5467d5

Browse files
authored
docs: Add setup instructions for API key to README (QwenLM#1)
1 parent f10aaf7 commit b5467d5

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,20 @@ This repository contains the Gemini Code CLI tool.
88

99
This project uses Gerrit for version control. For details on the development workflow, including how to clone the repository and contribute changes, please refer to the [Gerrit Dev Workflows](http://go/gerrit-dev-workflows).
1010

11+
## Setup
12+
13+
1. **Get a Gemini API Key:** Obtain your API key from Google AI Studio: [https://aistudio.google.com/app/apikey](https://aistudio.google.com/app/apikey)
14+
2. **Set Environment Variable:** Set the `GEMINI_API_KEY` environment variable to your obtained key. You can do this temporarily in your current shell session:
15+
```bash
16+
export GEMINI_API_KEY="YOUR_API_KEY"
17+
```
18+
Or add it to your shell's configuration file (like `~/.bashrc`, `~/.zshrc`, or `~/.profile`) for persistence:
19+
```bash
20+
echo 'export GEMINI_API_KEY="YOUR_API_KEY"' >> ~/.bashrc # Or your preferred shell config file
21+
source ~/.bashrc # Reload the config
22+
```
23+
Replace `"YOUR_API_KEY"` with your actual key.
24+
1125
## Building
1226
1327
To build the entire project, including the CLI package, run the following command from the root directory:

packages/cli/README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22

33
This package contains the core command-line interface for Gemini Code.
44

5+
## Setup
6+
7+
1. **Get a Gemini API Key:** Obtain your API key from Google AI Studio: [https://aistudio.google.com/app/apikey](https://aistudio.google.com/app/apikey)
8+
2. **Set Environment Variable:** Set the `GEMINI_API_KEY` environment variable to your obtained key. You can do this temporarily in your current shell session:
9+
```bash
10+
export GEMINI_API_KEY="YOUR_API_KEY"
11+
```
12+
Or add it to your shell's configuration file (like `~/.bashrc`, `~/.zshrc`, or `~/.profile`) for persistence:
13+
```bash
14+
echo 'export GEMINI_API_KEY="YOUR_API_KEY"' >> ~/.bashrc # Or your preferred shell config file
15+
source ~/.bashrc # Reload the config
16+
```
17+
Replace `"YOUR_API_KEY"` with your actual key.
18+
519
## Building
620
721
To build only the CLI package, navigate to this directory (`packages/cli`) and run:

0 commit comments

Comments
 (0)