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

# Gemini CLI

> 在 Gemini CLI 中接入 SeeOneAPI

[Gemini CLI](https://github.com/google-gemini/gemini-cli) 是 Google 推出的命令行 AI 编程工具，支持通过 OpenAI 兼容接口接入第三方模型。

## 配置方式

Gemini CLI 支持通过配置文件使用 OpenAI 兼容 API：

在 `~/.gemini/settings.json` 中配置：

```json theme={null}
{
  "models": {
    "default": {
      "provider": "openai",
      "baseUrl": "https://api.seeoneapi.com/v1",
      "apiKey": "sk-你的API密钥",
      "model": "claude-sonnet-4-5-20250929"
    }
  }
}
```

或通过环境变量：

```bash theme={null}
export OPENAI_API_KEY="sk-你的API密钥"
export OPENAI_BASE_URL="https://api.seeoneapi.com/v1"

gemini
```

## 常用命令

```bash theme={null}
# 启动交互模式
gemini

# 在当前项目中工作
gemini "帮我优化这个函数的性能"

# 代码审查
gemini "审查 src/ 目录下最近的改动"
```

<Tip>
  虽然叫 Gemini CLI，但通过 OpenAI 兼容接口，你可以用它来调用 Claude 和 GPT 系列模型。
</Tip>
