球球TokenQiuqiu Token Docs中文

Gemini CLI

Gemini CLI is the terminal entry for Gemini. With Qiuqiu Token, use CC Switch first, then fall back to manual installation and .env when needed.

  1. Use CC Switch Quick Config to write the Qiuqiu Token provider, Gemini CLI token, Base URL, and model.
  2. If CC Switch does not apply, install Gemini CLI manually.
  3. Continue to .env only when manual configuration is required.

Install and Configure

Prepare balance and the Gemini CLI Base URL in Quick Start, then create a Gemini CLI token in Create an API Token.

Windows

Command Prompt / Terminal
winget install OpenJS.NodeJS.LTS
choco install nodejs-lts
scoop install nodejs-lts
Command Prompt / Terminal
node -v
npm -v
Command Prompt / Terminal
npm install -g @google/gemini-cli
Command Prompt / Terminal
gemini --version
Command Prompt / Terminal
cd your-project-folder
gemini

Manual Configuration

Create the configuration directory:

  • Windows: %USERPROFILE%\.gemini
  • macOS / Linux: ~/.gemini
Command Prompt / Terminal
mkdir %USERPROFILE%\.gemini
cd %USERPROFILE%\.gemini

Create .env

Create .env after preparing a Gemini CLI token and the OpenAI-compatible Base URL.

.env
GEMINI_API_KEY=PASTE_GEMINI_CLI_TOKEN_KEY
GOOGLE_GEMINI_BASE_URL=https://api.qiuqiutoken.com/v1

Restart all Gemini CLI terminal windows so the new configuration is loaded.

Verification

  • The terminal recognizes gemini.
  • .env contains the Gemini CLI token and GOOGLE_GEMINI_BASE_URL.
  • Gemini CLI starts in a project directory and completes a small request.
  • The Qiuqiu Token console shows usage.

FAQ

  • gemini does not exist: add the npm global bin directory to PATH and reopen the terminal.
  • Permission is insufficient during installation: fix the npm user-level directory first.
  • Node.js is too old: install Node.js 18+ and reopen the terminal.
  • It still connects to the default service: check .env and old local environment variables.