元渊 API元渊 API
Deployment Guide

Gemini CLI Deployment Guide

Google AI programming assistant installation guide

Prerequisites

Please complete the Node.js environment installation first, ensuring Node.js 18+ is properly installed.

Prerequisite

Before configuring Gemini CLI with CC-Switch, ensure you have globally installed the Gemini CLI tool via npm:

npm install -g @google/gemini-cli

Verify installation: gemini --version

We recommend using the CC-Switch configuration tool for graphical configuration — simple and quick with no need to manually create configuration files.

Configuration Steps

Launch CC-Switch and Switch to the Gemini Tab

  1. Open the CC-Switch application
  2. Click the "Gemini" tab at the top
  3. Click the orange "+" button in the upper right corner to add a new configuration

Fill in Gemini CLI Provider Configuration

  1. Provider Name: Custom name (e.g., "元渊智能")
  2. Base URL: Enter https://api.ai.soraliststudio.com
  3. API Key: Paste your Gemini-specific token from the 元渊智能 platform
  4. Model: Select gemini-3-pro-preview or other available models
  5. Security settings: Adjust as needed (optional)
  6. Click "Save"
  • CC-Switch will automatically create ~/.gemini/.env and settings.json files
  • You can add multiple provider configurations and switch between them anytime
  • After switching, close and restart Gemini CLI for changes to take effect

Enable Configuration

  1. Find the "元渊智能" configuration you just created
  2. Click the "Currently Used" button on the right side
  3. The configuration will be marked as "Currently Used" (green label)
  4. Restart Gemini CLI for the new configuration to take effect

System Tray Quick Switch

CC-Switch supports quick Gemini CLI configuration switching via the system tray:

  • Right-click the CC-Switch icon in the system tray
  • Select the Gemini category from the menu
  • Directly select the configuration to switch to
  • Configuration takes effect immediately
  • Ensure you create a Gemini CLI-specific token from the 元渊智能 platform
  • Gemini tokens are not interchangeable with Claude Code/CodeX tokens
  • You need to restart Gemini CLI after switching configurations
  • You can test API endpoint speed in CC-Switch

Manual Command Line Configuration

If you don't use CC-Switch, follow these steps to manually install and configure Gemini CLI.

1. Install Gemini CLI Globally

npm install -g @google/gemini-cli

2. Configure Gemini CLI

Replace GEMINI_API_KEY below with your Gemini CLI-specific API key obtained from https://ai.soraliststudio.com!

Create the %USERPROFILE%\.gemini\ folder in your user directory.

Create the .env file:

GOOGLE_GEMINI_BASE_URL=https://api.ai.soraliststudio.com
GEMINI_API_KEY=your-api-key-from-元渊智能.cc
GEMINI_MODEL=gemini-3-pro-preview

Create the settings.json file:

{
  "ide": {
    "enabled": true
  },
  "security": {
    "auth": {
      "selectedType": "gemini-api-key"
    }
  }
}

3. Launch Gemini CLI

gemini

1. Install Gemini CLI Globally

npm install -g @google/gemini-cli

2. Configure Gemini CLI

Create configuration directory:

mkdir -p ~/.gemini
cd ~/.gemini

Create .env file:

cat > .env << 'EOF'
GOOGLE_GEMINI_BASE_URL=https://api.ai.soraliststudio.com
GEMINI_API_KEY=your-api-key-from-元渊智能.cc
GEMINI_MODEL=gemini-3-pro-preview
EOF

Create settings.json file:

cat > settings.json << 'EOF'
{
  "ide": {
    "enabled": true
  },
  "security": {
    "auth": {
      "selectedType": "gemini-api-key"
    }
  }
}
EOF

3. Launch Gemini CLI

gemini

1. Install Gemini CLI Globally

sudo npm install -g @google/gemini-cli

2. Configure Gemini CLI

Create configuration directory:

mkdir -p ~/.gemini
cd ~/.gemini

Create .env file:

cat > .env << 'EOF'
GOOGLE_GEMINI_BASE_URL=https://api.ai.soraliststudio.com
GEMINI_API_KEY=your-api-key-from-元渊智能.cc
GEMINI_MODEL=gemini-3-pro-preview
EOF

Create settings.json file:

cat > settings.json << 'EOF'
{
  "ide": {
    "enabled": true
  },
  "security": {
    "auth": {
      "selectedType": "gemini-api-key"
    }
  }
}
EOF

3. Launch Gemini CLI

gemini

FAQ

Where do I get the API Key?

Log in to the 元渊智能 platform and create a Gemini CLI-specific token.

Configuration File Locations

  • Windows: %USERPROFILE%\.gemini\
  • macOS/Linux: ~/.gemini/

How is this guide?