> ## Documentation Index
> Fetch the complete documentation index at: https://docs.geekai.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Gemini CLI

Gemini CLI is Google's terminal-based coding agent. It supports Gemini 3, can search and edit large codebases, generate applications from images or PDFs, and automate workflows.

Install [Node.js 18 or later](https://nodejs.org/en/download/) before you begin.

Install Gemini CLI:

```bash theme={null}
npm install -g @google/gemini-cli
```

Configure Gemini CLI to use the GeekAI endpoint:

```bash theme={null}
export GOOGLE_GEMINI_BASE_URL="https://geekai.co/api"
export GEMINI_API_KEY="<YOUR_GEEKAI_API_KEY>"
```

> `export` only affects the current shell session. To persist these settings, add the commands to `~/.bashrc` or `~/.zshrc`, then run `source ~/.bashrc` or `source ~/.zshrc`.

Replace `<YOUR_GEEKAI_API_KEY>` with your [GeekAI API key](https://geekai.co/user/api_keys). If you use the international base URL, obtain a key from [GeekAI International](https://geekai.dev/user/api_keys).

The default balanced route is suitable for individual developers. For larger projects or faster, more stable responses, edit your key on the [API Keys page](https://geekai.co/user/api_keys) and select the high-availability route.

![Changing the API key route](https://static.geekai.co/storage/2025/07/26/image-20250726123753201.png)

For a lower price, you can switch to the low-cost route, at the expense of availability.

Open your project directory in the terminal and start Gemini CLI:

```bash theme={null}
gemini
```

![Starting Gemini CLI for the first time](https://static.geekai.co/storage/2025/11/27/image-20251127141940635.png)

Once the interactive prompt appears, ask Gemini for coding suggestions or help solving a programming problem:

![Coding with Gemini CLI through GeekAI](https://static.geekai.co/storage/2025/11/27/image-20251127142239041.png)

The version shown here defaults to Gemini 2.5 Pro. To use Gemini 3 Pro Preview, open settings and select **Preview features**:

```bash theme={null}
/settings
```

![Enabling preview features in Gemini CLI](https://static.geekai.co/storage/2025/11/27/image-20251127142600180.png)

Preview features are off by default. Press Enter to enable them. Use `/model` to switch between the available Gemini models:

```bash theme={null}
/model
```

![Switching models in Gemini CLI](https://static.geekai.co/storage/2025/11/27/image-20251127143601470.png)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.